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:
On this picture, i've done the script in Geany, and added some explanation on a few things:
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