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
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#11
RE: Click on entity for message

Sorry it's just my english is not so good
I have no idea if you did that Smoke sorry
Thank you
(This post was last modified: 03-04-2013, 10:11 PM by User01.)
03-04-2013, 10:11 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#12
RE: Click on entity for message

(03-04-2013, 10:11 PM)User01 Wrote: Sorry it's just my english is not so good
I have no idea if you did that Smoke sorry
Thank you

I didn't, I'll fix it when I'm back home
03-04-2013, 10:12 PM
Find
darksky Offline
Member

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

if i get it correctly ,he wants that after an interaction you can do the next interaction only if the message is no longer displayed

your script does not have this
03-04-2013, 10:13 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#14
RE: Click on entity for message

(03-04-2013, 10:13 PM)darksky Wrote: if i get it correctly ,he wants that after an interaction you can do the next interaction only if the message is no longer displayed

your script does not have this

Yeah, I just said that..
03-04-2013, 10:14 PM
Find
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
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#16
RE: Click on entity for message

I just arrived home and I see it's fixed Wink
I'd just use a blockbox and place some SetEntityActive's in the script. But that's neater I think.
03-04-2013, 10:37 PM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#17
RE: Click on entity for message

Wouldn't it be MUCH simpler to do it like this?

PHP Code: (Select All)
void function1(string &in asEntity)

{
SetMessage("FirstMessageCategory""FirstMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName"""true);

AddTimer("SetSecondMessage",4,"SetSecondMessage");
}


void SetSecondMessage(string &in asTimer)
{

SetMessage("SecondMessageCategory""SecondMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName""NewCallbackFunction"true);
}


void NewCallbackFunction(string &in asEntity)

{
SetMessage("SecondMessageCategory""SecondMessageName"2);







I think that does everything?
(This post was last modified: 03-04-2013, 11:18 PM by ExpectedIdentifier.)
03-04-2013, 11:16 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#18
RE: Click on entity for message

(03-04-2013, 11:16 PM)sonataarctica Wrote: Wouldn't it be MUCH simpler to do it like this?

PHP Code: (Select All)
void function1(string &in asEntity)

{
SetMessage("FirstMessageCategory""FirstMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName"""true);

AddTimer("SetSecondMessage",4,"SetSecondMessage");
}


void SetSecondMessage(string &in asTimer)
{

SetMessage("SecondMessageCategory""SecondMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName""NewCallbackFunction"true);
}


void NewCallbackFunction(string &in asEntity)

{
SetMessage("SecondMessageCategory""SecondMessageName"2);







I think that does everything?

Have you tested it?
(This post was last modified: 03-05-2013, 07:45 AM by OriginalUsername.)
03-05-2013, 07:45 AM
Find
ExpectedIdentifier Offline
Member

Posts: 234
Threads: 10
Joined: Sep 2012
Reputation: 11
#19
RE: Click on entity for message

(03-05-2013, 07:45 AM)Smoke Wrote:
(03-04-2013, 11:16 PM)sonataarctica Wrote: Wouldn't it be MUCH simpler to do it like this?

PHP Code: (Select All)
void function1(string &in asEntity)

{
SetMessage("FirstMessageCategory""FirstMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName"""true);

AddTimer("SetSecondMessage",4,"SetSecondMessage");
}


void SetSecondMessage(string &in asTimer)
{

SetMessage("SecondMessageCategory""SecondMessageName"2);

SetEntityPlayerInteractCallback("TheEntitiesName""NewCallbackFunction"true);
}


void NewCallbackFunction(string &in asEntity)

{
SetMessage("SecondMessageCategory""SecondMessageName"2);







I think that does everything?

Have you tested it?

No I haven't but the logic makes sense and I've used something similar in a full conversion before :-)
03-05-2013, 09:05 AM
Find




Users browsing this thread: 1 Guest(s)