- Joined
- Feb 7, 2005
- Messages
- 409
Ok, so, say I built multiple triggers that at points inside each trigger do the same thing.
Case In Point: My heroes can equip items, when they do, it sets animations, hero glows, and attachments based on the item.
Some abilities and death cause these to mess up, so in those cases it also sets animations, hero glows, and attachments.
Say I make a separate trigger (Z) that sets all the animations, hero glows, and attachments to a variable unit X
then in each trigger I set the triggering unit (buying, dying, casting) to unit X, run trigger Z, set udg_X = null.
Would this work? or would the multiple events clash / leak? Basically I want to put all the functions I would normally put in the same trigger in another trigger and call them using a set variable, then unsetting the variable after. This would cause the triggers to be smaller since instead of:
set attachment hand left = this one
set attachment hand right = this one
set attachment chest = this one
set attachment head = this one
set unit colour = this one
for every trigger it's just
set unit X = triggering unit
run trigger Z
set udg_X = null
Case In Point: My heroes can equip items, when they do, it sets animations, hero glows, and attachments based on the item.
Some abilities and death cause these to mess up, so in those cases it also sets animations, hero glows, and attachments.
Say I make a separate trigger (Z) that sets all the animations, hero glows, and attachments to a variable unit X
then in each trigger I set the triggering unit (buying, dying, casting) to unit X, run trigger Z, set udg_X = null.
Would this work? or would the multiple events clash / leak? Basically I want to put all the functions I would normally put in the same trigger in another trigger and call them using a set variable, then unsetting the variable after. This would cause the triggers to be smaller since instead of:
set attachment hand left = this one
set attachment hand right = this one
set attachment chest = this one
set attachment head = this one
set unit colour = this one
for every trigger it's just
set unit X = triggering unit
run trigger Z
set udg_X = null