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

[Trigger] lifetime of triggers?

Status
Not open for further replies.
Level 2
Joined
Mar 8, 2009
Messages
11
Hey guys,

i have got this simple trigger - he is just spawning units every few seconds

trigger1.JPG

the trigger hisself is working well, the problem is - if this trigger got triggered :p

trigger2.JPG

and as you can imagine, he triggers very often the frist trigger is sometimes going to stop

maybe its my bad, but i can imagine that there is a lifetime for triggers or a max number of triggers that can "run" at the same time

well maybe someone knows what my problem is, thx 2 u
 
Level 2
Joined
Mar 8, 2009
Messages
11
well i know it's hard to explain - sry 4 the german triggers
maybe, if you have got the time you can simply check it out on your own

View attachment SplitWar.w3x here is the map

everything is working very well, unitl using treants with their regeneration ability - in some waves the units will stop spawning

i think it's because of the -> Waits <- in the for each

however now you can try it if you want to
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Well normally trigger that are activated are put on a "trigger stack". They will then run in the order they were put on that stack. (at least i think so and there are some triggers which can empty the "trigger stack")

I would remove the "wait" in the loop because that makes the whole trigger need long time to end..

Instead use "rejuveration" as a healing spell and make a unit cast it. (because that spell heals over some time.)
 
Level 2
Joined
Mar 8, 2009
Messages
11
@DarkAngelAzazel

i am using the normal wc3 editor, as far as i know i can just give the command to cast a basic spell at a target or a point
if you open my map i used it for the choppers to fire rockets

if this is the only way i want to keep the regeneration spell for another unit, but maybe i am just 2 nooby - is there a way to give the command to a unit to use an selfmade ability on a target?

@Dr Super Good
i am sorry, but i don't really know how to increase a units health regeneration without adding an ability to the unit

the treants should regenerate 5% of their life every 3 sec for 15 sec
dunno how to do this with hp reg - but maybe there is a trigger to do that (don't know)
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
What is you try to replace the (Integer A) loop with a loop with custom integer,, cause it might be because of the waits within a loop, and (Integer A) is a global, not a local variable,,
Try to use the:
"For each integer 'Variable' " action instead of the "For each integer A"
 
Level 2
Joined
Mar 8, 2009
Messages
11
hmm haven't tested it that often, but seems to work thx

good to know that this variable isn't private for each loop (as in most programming languages)
thx 4 info man
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Actually, you can make them private in JASS, just blizzard messed up big time when they made GUI. GUI does not display half the capabilities that coding directly into JASS does, which is quite an amazing feet as you are hard pressed to make an interface for a language so poor.
 
Status
Not open for further replies.
Top