I think he is trying to say waits with more decimal places. 0.0000 <-- like this but substituting any integer for the zeros.
call TimerStart(CreateTimer(), 0.001, false, function YourFunc)
Actually, the problem he's referring to is that a GUI wait, which translates to TriggerSleepAction() in JASS, seems to wait a minimum of 0.27 seconds even if you put a lower value in, IIRC. The way to fix this is indeed to use timers, as _whelp said in their first post.
If there was a unit near, then explode and skip remaining actions, else, pause momentarily and then repeat with Integer A incrementedThe wait in your if-then-else is unneeded, as it really doesn't do anything.
whoops, sorry. here i'll post the code.
Trigger:
- Untitled Trigger 001
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Fire
- Actions
- Unit - Order (Triggering unit) to Stop
- For each (Integer A) from 1 to 15, do (Actions)
- Loop - Actions
- Unit - Create 1 Footman for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by ((Real((Integer A))) x 75.00) towards (Facing of (Triggering unit)) degrees) facing (Facing of (Triggering unit)) degrees
- Set UnitGroup = (Units within 75.00 of (Position of (Last created unit)) matching (((Matching unit) Not equal to (Triggering unit)) and (((Unit-type of (Matching unit)) Not equal to Footman) and (((Matching unit) is dead) Not equal to True))))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (UnitGroup is empty) Not equal to True
- Then - Actions
- Unit - Explode (Last created unit)
- Unit Group - Pick every unit in UnitGroup and do (Actions)
- Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing 50.00 damage of attack type Normal and damage type Normal
- Skip remaining actions
- Else - Actions
- Wait 0.00 seconds
the wait would be MUI because i don't reference any variables. but timers are variables so it would destroy that concept
Edit: and i would remove each unit when the next unit was spawned
First off, you DO use a variable, UnitGroup. Also, that trigger leaks points for which you need a variable.
Oh, I'm not familiar with that leak, i'll clean it up later; thanks. I didn't notice the variable, but it's legitamate because I set it and and then use it before the wait.
And the wait would be longer than .01 seconds--allegedly, the minimum wait is .27 seconds...i might need it to be half as long or something