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
Script Help My locked door doesn't display a message?
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: My locked door doesn't display a message?

You do not have a callback in the script for the function "lockedoor"; would I be correct to assume that your have one in the level editor as "PlayerInteractCallback" for the door under the entity tab? If not, here is a callback you can use:

void OnStart()
{
SetEntityPlayerInteractCallback("locked1", "lockedoor", true);

}

Alternatively, you can set up an interact callback via the level editor (I prefer this method so I don't use up extra space in my hps file). Simply select any entity (a door in this case), go to the "entity" tab on the right, and in the box under "PlayerInteractCallback" type in anything (this will be the name of the function). You can write the rest of it in the hps file as:

void FUNC(string &in asEntity)
{
///do stuff
}

Hope that helped.

I rate it 3 memes.
07-08-2012, 04:43 AM
Find


Messages In This Thread
RE: My locked door doesn't display a message? - by Adny - 07-08-2012, 04:43 AM



Users browsing this thread: 1 Guest(s)