Rickvs
Junior Member
Posts: 2
Threads: 1
Joined: Feb 2013
Reputation:
0
|
Using the PlayerInteractCallBack func
Hello guys, my name is Rick and I'm a complete noob when it comes to scripting, therefore help would be highly appreciated.
Situation I have in mind:
The player walks to a (locked) door, interacts with it, and suddenly a hallucinated monster appears behind him.
What I've got so far:
The player can interact with the door, the locked sound plays and obviously the door doesn't open, but nothing else happens...
Problem:
In the level editor, I clicked on the door and set the PlayerInteractCallBack tag to MonsterAppears.
In (mapname).hps I have this, copied from the wiki:
void MonsterAppears(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
}
And of course the enter, leave, and startup fuctions.
This doesn't work. You might me thinking I'm seriously stupid if you see the problem, but I honestly can't find it. Do I need to add more code?
(This post was last modified: 02-16-2013, 07:12 PM by Rickvs.)
|
|
02-16-2013, 06:52 PM |
|