• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Running trigger from String variable

Status
Not open for further replies.
Level 3
Joined
Oct 6, 2008
Messages
47
Is it possible to run a trigger using a string variable. Eg: String variable 'Round' is equal to Round1. So I can run a trigger named Round1.
 
There is a function called ExecuteFunc, it takes string as parameter and allows to run specified function. However, there are some bugs (like called function shouldn't take any arguments to it, and function must exist), that can cause game crash.

Example code:

JASS:
function MyTrigger_run takes nothing returns nothing
  call TriggerExecute(gg_trg_MyTrigger)
endfunction

// . . .
call ExecuteFunc("MyTrigger_run")
// . . .
 
Status
Not open for further replies.
Back
Top