• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger Event or Create Whole Trigger?

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
if i want do something like this:

1. a mpi Hero die, then in trigger A create a unit add new Event to trigger B, where this new unit is the triggerint unit
(Unit - A unit comes within 56.00 of udg_spirit)

2. if spirit go close to dead people then remove spirit and revive hero


this ok, i can do it but since with every death a new spirit/wisp created allways just raising the events in trigger B, i could store event and remove it from trigger B or i must create trigger in jass and destory it if its done? (if second then where i must destory it? in last line in created trigger or in parent trigger?)
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
if i want do something like this:

1. a mpi Hero die, then in trigger A create a unit add new Event to trigger B, where this new unit is the triggerint unit
(Unit - A unit comes within 56.00 of udg_spirit)

2. if spirit go close to dead people then remove spirit and revive hero


this ok, i can do it but since with every death a new spirit/wisp created allways just raising the events in trigger B, i could store event and remove it from trigger B or i must create trigger in jass and destory it if its done? (if second then where i must destory it? in last line in created trigger or in parent trigger?)

Well, you could ofcourse create the trigger through script and make sure that it destroys itself after the trigger has been fired.

So for example: a mpi Hero dies, the trigger get's created, the event gets registered, the actions get registered to the trigger. The last action of that trigger is to destroy itself.

So for each unit that is being created a trigger will be created with the event of that unit, then when the trigger gets fired through the event, the trigger gets destroyed.

I'm not sure about removing the event from the trigger, I haven't checked if there is a native for that.
As far as I know I would do it like I suggested here :p

As long as your not massively creating triggers which get fired after a really long time, then I don't think it will cause any issues. If it does, then it just means that there are way to many triggers created before they are being destroyed.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Well, you could ofcourse create the trigger through script and make sure that it destroys itself after the trigger has been fired.

So for example: a mpi Hero dies, the trigger get's created, the event gets registered, the actions get registered to the trigger. The last action of that trigger is to destroy itself.

So for each unit that is being created a trigger will be created with the event of that unit, then when the trigger gets fired through the event, the trigger gets destroyed.

I'm not sure about removing the event from the trigger, I haven't checked if there is a native for that.
As far as I know I would do it like I suggested here :p

As long as your not massively creating triggers which get fired after a really long time, then I don't think it will cause any issues. If it does, then it just means that there are way to many triggers created before they are being destroyed.

i want mpi timer (its similiar than mui since i use custom value for detect it and unit group like at mui spell case)

since i want more case could be max 20 trigger same time (10 player x 2)
how much the max trigger amount what i could create and destory or its depend from my regular triggers what was created in normal way not via jass.
 
Status
Not open for further replies.
Top