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
Display message only when looking at an entity
Akos115 Offline
Member

Posts: 101
Threads: 14
Joined: Aug 2012
Reputation: 0
#1
Display message only when looking at an entity

What I want, is to make a message appear on the screen when the player looks at an entity. But when i use my script, the message is displayed two times: when the player looks at it, and when looks away from it after looking at it.Here is my script:

void OnStart ()
{
SetEntityPlayerLookAtCallback("chair", "price_chair", false);

}


void price_chair(string &in asEntity, int alState)
{
SetMessage("price", "chair", 0);
}

I tried to change "int alState" into "int 1", but then the game crashes. Anyone got an idea? C:

09-25-2012, 03:33 PM
Find


Messages In This Thread
Display message only when looking at an entity - by Akos115 - 09-25-2012, 03:33 PM



Users browsing this thread: 1 Guest(s)