| 
		
	
		| User01   Member
 
 Posts: 97
 Threads: 30
 Joined: Feb 2013
 Reputation: 
0
 | 
			| RE: Click on entity for message 
 
				Sorry it's just my english is not so goodI 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 |  |  
	
		| OriginalUsername   Posting Freak
 
 Posts: 896
 Threads: 42
 Joined: Feb 2013
 Reputation: 
34
 | 
			| RE: Click on entity for message 
 
				 (03-04-2013, 10:11 PM)User01 Wrote:  Sorry it's just my english is not so goodI 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 |  |  
	
		| darksky   Member
 
 Posts: 52
 Threads: 8
 Joined: Nov 2012
 Reputation: 
2
 | 
			| 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 |  |  
	
		| OriginalUsername   Posting Freak
 
 Posts: 896
 Threads: 42
 Joined: Feb 2013
 Reputation: 
34
 | 
			| 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 |  |  
	
		| darksky   Member
 
 Posts: 52
 Threads: 8
 Joined: Nov 2012
 Reputation: 
2
 | 
			| RE: Click on entity for message 
 
				yes, but when i wrote my answer your answer was not there yet    
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 |  |  
	
		| OriginalUsername   Posting Freak
 
 Posts: 896
 Threads: 42
 Joined: Feb 2013
 Reputation: 
34
 | 
			| RE: Click on entity for message 
 
				I just arrived home and I see it's fixed   
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 |  |  
	
		| ExpectedIdentifier   Member
 
 Posts: 234
 Threads: 10
 Joined: Sep 2012
 Reputation: 
11
 | 
			| RE: Click on entity for message 
 
				Wouldn't it be MUCH simpler to do it like this? 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?
			 |  |  
	| 03-04-2013, 11:16 PM |  |  
	
		| OriginalUsername   Posting Freak
 
 Posts: 896
 Threads: 42
 Joined: Feb 2013
 Reputation: 
34
 | 
			| 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?
 
 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?
			 |  |  
	| 03-05-2013, 07:45 AM |  |  
	
		| ExpectedIdentifier   Member
 
 Posts: 234
 Threads: 10
 Joined: Sep 2012
 Reputation: 
11
 | 
			| 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?
 
 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 |  |  |