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
Click on entity for message
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#15
RE: Click on entity for message

yes, but when i wrote my answer your answer was not there yet Smile

User01, try it like this

void OnStart()
{
    SetLocalVarInt("message", 0);
    SetEntityPlayerInteractCallback("Object", "function1", false);
}

bool showMessage = true;

void function1(string &in asEntity)
{  
    if(showMessage){
       if(GetLocalVarInt("message") == 1)
       {
           showMessage = false;
           SetMessage("Category", "Entry2", 2);
           AddTimer("", 2, "messagedone");
       }
       else
       {
           showMessage = false;
           SetMessage("Category", "Entry1", 2);
           AddTimer("", 2, "secondmessage");
       }
   }
}

void secondmessage(string &in asTimer)
{
    SetMessage("Category", "Entry2", 2);
    AddLocalVarInt("message", 1);
    AddTimer("", 2, "messagedone");
}

void messagedone(string &in asTimer)
{
    showMessage = true;
}
(This post was last modified: 03-04-2013, 10:28 PM by darksky.)
03-04-2013, 10:27 PM
Find


Messages In This Thread
Click on entity for message - by User01 - 03-04-2013, 06:19 PM
RE: Click on entity for message - by darksky - 03-04-2013, 07:15 PM
RE: Click on entity for message - by User01 - 03-04-2013, 07:38 PM
RE: Click on entity for message - by User01 - 03-04-2013, 08:14 PM
RE: Click on entity for message - by User01 - 03-04-2013, 09:41 PM
RE: Click on entity for message - by darksky - 03-04-2013, 09:52 PM
RE: Click on entity for message - by User01 - 03-04-2013, 10:00 PM
RE: Click on entity for message - by darksky - 03-04-2013, 10:04 PM
RE: Click on entity for message - by User01 - 03-04-2013, 10:11 PM
RE: Click on entity for message - by darksky - 03-04-2013, 10:13 PM
RE: Click on entity for message - by darksky - 03-04-2013, 10:27 PM



Users browsing this thread: 5 Guest(s)