Frictional Games Forum (read-only)

Full Version: Scripting help!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a very noobie guy who is trying to make a amnesia custom story and I only know a few things and I have tried to get the monster to be active when I etc. open a door but with no sucsess. Can anyone help me with this? Some scripting help. Ps: my skype is bjosmep Wink
I added you on skype ... im the one with the weird picture ...
Hello! I may be able to help you! Assuming that you've not done the basic scripting start, ill write exatly how you'll do :) Just make sure to remove the Spaces i've done and replace them using the "tab" button.

So, if you wonder what things mean, look here:
"KeyOne" is the Entity that should trigger the monster activation, if it is a door, it could be something like "mansion_1".
"MonsterActivation" is the callback, it'll be explained underneath the OnStart column.
True is if you want the event to remove it self after it has happend. If false, you can open the door several times and trigger the monster.

I use a Key as an entity (named KeyOne in the level editor) so this should be easy to follow :)

void OnStart()
{
SetEntityPlayerInteractCallback("KeyOne", "MonsterActivation", true);
}

void MonsterActivation(string &in item)
{
SetEntityActive("enemy_grunt_1", true);
}

So, this means that the monster (in my case named enemy_grunt_1) must be inactivated in the level editor from the beginning. Like this:
[Image: 21njmg9.jpg]

On this picture, i've done the script in Geany, and added some explanation on a few things:
[Image: vxlmgw.png]

Tell me if it's not working and i'll help you as well as i can!

Add me on Skype if you wish: ZekeSnakey
Necro Fucking Bump.
O M G!
What you said Lazzer. LOOOL!
That bump hahhaha Wink
CLosed within minutes Tongue By Tragey who else Tongue
God damn, a four year necro post!
Bye bye ye old crypt.

-Locked