The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using the PlayerInteractCallBack func
Rickvs Offline
Junior Member

Posts: 2
Threads: 1
Joined: Feb 2013
Reputation: 0
#1
Question  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
Find


Messages In This Thread
Using the PlayerInteractCallBack func - by Rickvs - 02-16-2013, 06:52 PM



Users browsing this thread: 1 Guest(s)