HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Little question on Event Responses

11-07-2007, 11:50 PM#1
MrApples
For Event Responses, like Triggering Player, are they always set to the last?

For example, if I had a trigger which had a event which produced the event response "Triggering Player", and I ran a trigger from that trigger, would Triggering Player still be able to be used in that trigger?

Code:
Trigger One
Events
    Someone types something
Actions
    Trigger - Run Trigger Two

Code:
Trigger Two
Events
    (none)
Actions
    Do stuff with (Triggering Player)
11-08-2007, 12:55 AM#2
Dil999
No. You need globals variables to use GUI and pass things from one trigger to the next.
11-08-2007, 02:51 AM#3
MrApples
Woops, just realized Triggering Player is a bad example. What about entering unit?
11-08-2007, 03:17 AM#4
TheDamien
Quote:
Originally Posted by MrApples
Woops, just realized Triggering Player is a bad example. What about entering unit?

Same thing with entering unit, I'm 99% sure. GetTriggerUnit() does basically the same thing as GetEnteringUnit().
11-08-2007, 06:43 AM#5
Pyrogasm
TheDamien is correct.

And the definitive answer here is: no, you can't do that. The only way to pass event responses from function to function is the use ExecuteFunc.

In your case, if you replaced the line in Trigger 1 with this, it would work:
Trigger:
Custom script: call ExecuteFunc(Trig_Trigger_2_Actions)
11-08-2007, 11:07 AM#6
Anitarf
Actualy, it's:
Trigger:
Custom script: call ExecuteFunc("Trig_Trigger_2_Actions")
11-08-2007, 04:52 PM#7
Vexorian
Quote:
Originally Posted by Pyrogasm
TheDamien is correct.

And the definitive answer here is: no, you can't do that. The only way to pass event responses from function to function is the use ExecuteFunc.

In your case, if you replaced the line in Trigger 1 with this, it would work:
Trigger:
Custom script: call ExecuteFunc(Trig_Trigger_2_Actions)
Where is this non-sense coming from?

TriggerExecute passes all event responses but (GetTriggeringTrigger()) to the new trigger...
11-08-2007, 11:12 PM#8
Pyrogasm
Oops, Anitarf, I knew I forgot something...
Quote:
Originally Posted by Vexorian
Where is this non-sense coming from?

TriggerExecute passes all event responses but (GetTriggeringTrigger()) to the new trigger...
Really? I never knew....