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
[SOLVED] Setting message on interacting with entity
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#2
RE: [Question] Set Message on player interacting with LOCKED door

What you need to do is select your entity in the level editor and go to the entity tab, from there enter something into the PlayerInteractCallback field (like "InteractDoor")

Then go into your code for that level and type something like
void InteractDoor(string &in asEntity)
{
    if(GetLocalVarInt("Door") != 1)
    {
        SetMessage("Message", "Message", 0);
    }
    else
    {

    }
}

In the above example lets say the variable goes to 1 when the player picks up the key. Anytime he interacts with it before the key the message will show, and anytime he interacts with it and he has the key nothing will happen.

(This post was last modified: 01-18-2011, 01:46 AM by triadtimes.)
01-18-2011, 12:59 AM
Find


Messages In This Thread
RE: [Question] Set Message on player interacting with LOCKED door - by triadtimes - 01-18-2011, 12:59 AM



Users browsing this thread: 1 Guest(s)