• 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.

Custom Events

Status
Not open for further replies.
Level 13
Joined
Apr 15, 2008
Messages
1,063
Is there any use for Custom events, or is it another incomplete feature? They are pretty buggy right now (using custom event will fail, unless it has one parameter, trigger).

I checked the galaxy code generated from this event, and all it does, is create a function that represents this event, and calls this function for every trigger that has it in the events list.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
I think it was designed for a more dynamic virtual machine where you could create event like structures. However that support seems missing in SC2 as it only permits you to run a few trigger respones to an event at any time.

My only possible use for it I can imagine is if you want to make your code more readable. Instead of 100 preplaced units die evenets, you could make a "custom" event which contains all that and have in the actual trigger "A creep unit dies" (not 100s of events).
 
There already are custom events, you just need to get creative, really.
Manipulate regions, abilities and stat changes as hosts for events.
You can even use one trigger to set off different triggers with a if/then/else (I did this in my space game).
Just make sure if you want to have one trigger turn on another trigger with the same (or similar) event, make an action that waits 0.5 real-time seconds before firing off the "turn on (trigger)" otherwise it will auto-run.
Yeah, hope that helps.
 
Status
Not open for further replies.
Top