How activate monster, (which is in room opposite my room, where is key) after pick key.
The idea is that when you pick up a monster from the other room will start to pry the door to get to my room, where I picked up the key , and then to come out and disappear.
you make a function that makes the monster come into the room.
You add an interact callback to the key, that calls said function.
For further specifics check out the dev wiki, reference existing scripts from frictionalgames or mods, threads with similar questions, or look up the video tutorials from people such as mudbill or thisisyourcomputer on youtube.
Hello, Abihishi,
I see you're making progress. I would divide your question into multiple sub-questions.
Calling a function OnPickUp
Hinting The Enemy
(optional) Enemy Path Nodes
From your question I understand that you want the monster to be a hallucination.
You achieve that in Level Editor, by selecting the enemy and checking the Hallucination CheckBox. Keep in mind that the value under it represents the distance at which the monster disappears.
Hmm, yes. Before 2 weeks i see video when guy make monster paths, so i watch Mudbill video and i try make this paths.
Mhmhhm..... i made how in video, but i changed scriptarea in my key but this not work. I does not want scriptarea, when my character must enter in this area.Ok i try make this Calling a function OnPickUp but, this is good script?
The command you chose refers to a Function that you will need to create.
PHP Code:
SetEntityCallbackFunc("servant_grunt_1", "key0");
In plain words you are saying:
If player touches servant_grunt_1, then run key0 function.
That's not what you want.
The script you most likely want is:
PHP Code:
void OnStart() { SetEntityCallbackFunc("NameOfEntity", "MonsterAppearanceFunc"); //NameOfEntity = Name of the key }
void MonsterAppearanceFunc(string &in asEntity, string &in type) //The name of this function was in the callback earlier { SetEntityActive("NameOfEnemy", true); //Remember to change NameOfEnemy ShowEnemyPlayerPosition("NameOfEnemy"); //Remember to change NameOfEnemy }
If you have no idea what you're supposed to change to what, you can use the
I don't know what I'm supposed to change version:
Spoiler below!
PHP Code:
string EnemyName = "Servant_grunt_1"; //Change this to your monster's name;ยจ string ItemName = "key_0"; //Change this to your key's name;