HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger not working...

05-12-2007, 07:06 PM#1
Shinzui
This is supposed to be an omnislash like ability, it works but it isnt going through the loop as many times as i say. it should be 80 but it only goes for 20. Anyone know what it could be?
Edit: does anyone know why its moving all the text to the left like that?
Edit again: TY for fixing trigger, i just have to type trigger and /trigger? seems so easy i feel stupid...

Trigger:
Celerity 1
Events
Conditions
Collapse Actions
Unit - Make Celeritycaster1 Invulnerable
Animation - Change Celeritycaster1's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
Collapse For each (Integer A) from 1 to 80, do (Actions)
Collapse Loop - Actions
Wait 0.25 game-time seconds
Set Celeritycasterloc1 = (Position of Celeritycaster1)
Set Celeritygroup1[1] = (Units within 600.00 of Celeritycasterloc1 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Celeritycaster1)) Equal to True) and ((((Matching
Set Celeritygroup1[2] = (Random 1 units from Celeritygroup1[1])
Custom script: call RemoveLocation(udg_Celeritycasterloc1)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in Celeritygroup1[1]) Greater than 0
Collapse Then - Actions
Collapse Unit Group - Pick every unit in Celeritygroup1[2] and do (Actions)
Collapse Loop - Actions
Set CelerityTarget1 = (Picked unit)
Set CelerityTargetLoc1 = (Position of CelerityTarget1)
Selection - Remove Celeritycaster1 from selection
Unit - Move Celeritycaster1 instantly to CelerityTargetLoc1
Custom script: call RemoveLocation(udg_CelerityTargetLoc1)
Animation - Play Celeritycaster1's attack animation
Unit - Cause Celeritycaster1 to damage CelerityTarget1, dealing CelerityDamage damage of attack type Hero and damage type Normal
Custom script: call DestroyGroup(udg_Celeritygroup1[1])
Custom script: call DestroyGroup(udg_Celeritygroup1[2])
Collapse Else - Actions
Custom script: call DestroyGroup(udg_Celeritygroup1[1])
Custom script: call DestroyGroup(udg_Celeritygroup1[2])
Selection - Add Celeritycaster1 to selection for (Owner of Celeritycaster1)
Animation - Change Celeritycaster1's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Make Celeritycaster1 Vulnerable
Selection - Add Celeritycaster1 to selection for (Owner of Celeritycaster1)
Animation - Change Celeritycaster1's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
Unit - Make Celeritycaster1 Vulnerable
05-12-2007, 07:33 PM#2
Pyrogasm
The formatting goes all wonky-jod like that when you don't use [trigger] tags. I've fixed them for you.

80 loops is ~20 seconds... are you sure you want it to loop that long? It's possible that the wait is fucking it up too.
05-12-2007, 07:45 PM#3
Shinzui
There needs to be a wait, How would that ruin it exactly? the loops are changed by another trigger based on spell level, and i will change that based on balance. This is just to see if i could make it go. it should be going for 20s with the current number but its only going about 5-6 and about 20 loops (its hard to accurately count something so fast. Perhaps its going too fast? I bet its the play attack animation part, it cant play it that fast so its slowing itself down?
I had another triggered spell with loops waits and attack anim and it went waaaaaaay to slow. Now this ones too fast...lol. I dont quite understand the inner workings of "play unit animation" triggers. Does everything stop for it to finish anim?
05-12-2007, 07:50 PM#4
Pyrogasm
As the the first line of the loop, add this line:
Trigger:
Game - Display to (All players) the text (String((IntegerA)))
It will enable you to see how many times the loop actually runs and just how often.


Additonally, make the Wait command the last action in the loop.
05-12-2007, 08:11 PM#5
Shinzui
Ok, so this is supposed to be cast by multiple units. Every unit has its own global variables. the text message counts by 4s and ends at 81 (there are 4 units casting spell) the trigger isnt subtracting variable a every loop it just say do it loopvariable times. So is the action for every variable A from 1 to # not multi instanceable?

Edit: 2nd test counted to 83...

Edit again: I cant imagine the patience it must take to help so many people with simple stuff. ^_^
05-12-2007, 08:24 PM#6
Bloodlust
Dont use wait, try to work around it. I bet it works without wait.
05-12-2007, 08:30 PM#7
Shinzui
Lol, it seems from integer a isnt multi instanceable after all, ill try to work around it for now as for the wait... if theres no wait then the spell wont take any time your supposed to tp around and attack people visibly. But ill try that next.

Edit: worked around that action it goes the correct # of times now, but it doesnt use exactly 20s like it should (.25*80 loops) each loop takes longer than .25s, maybe i should put the wait somewhere else?

Edit again: Ok moving the wait doesnt work, it seems like its waiting longer than .25s, I dont even know where to start on this one. The counter goes every .25s but the rest stops working at 54...
05-12-2007, 09:04 PM#8
Pyrogasm
The shortest you can possibly wait is ~0.27 seconds. Waits can be set for any amount, but anything under that amount simply won't wait that long.

To get it to go sooner, you'll need a repeating trigger that occurs "Every 0.25 seconds of game-tme".
05-12-2007, 09:28 PM#9
Shinzui
I changed wait to at the end of the loop, made it .33, and made loops=60
it should still last 20s (.33x60=19.8s close enough)
It is now doing the correct # of loops but its lasting longer than 20s its going ~25. How do i post a map in a thread? (incase i ever have to, which may be today lol)

Edit: I put a timer to say a message 20s after casting, and it counts to 60 while doing the loop
the counter says 20s after 47 loops (47x.33 is NOT 20)
05-12-2007, 09:31 PM#10
Pyrogasm
You can post the map here by simply uploading it as an attachment. In the reply window, go to the "Additional Options" area and click the "Manage Attachments" button; everything else should be self-explainatory.

You can also host the map in the PasteBin the same way and link to it instead of uploading it every post. Or (if you really need help now) you could PM/IM me; my IM is "luvs2playdasax18".
05-12-2007, 09:55 PM#11
Shinzui
It seems to be working properly just slower than intended, even with a wait of .33. Well here it is if you would like to look at it.
Attached Files
File type: w3xHero workshop.w3x (77.0 KB)
05-13-2007, 09:41 AM#12
Fireeye
Well, the spells ingame looks nice, but there are several things you should change.
1. You leak in several triggers locations, e.g. Fire Rocket, because you use polar offset which creates a new location.
2.Most of the Spells aren't really MUI, only Dark Pulse is MUI without the need to translate it into JASS or using a huge array due it doesn't use any wait, but the other Spells aren't MUI. (e.g. i had several permanent clones of me after i used the celerity spell again while it was active and i didn't change the triggers.
3. Often you're copying actions and just change 1 value. e.g. Fire Rocket, use a Loop instead of in this case 8 times the same actions.
It would look for Fire Rocket like this
Trigger:
For each (Integer A) from 0 to 7, do (Actions)
Collapse Loop - Actions
Unit - Create 1 Firedummy for Neutral extra at (FRcaster_loc offset by 256.00 towards (45.00 x (Real((Integer A)))) degrees) facing FRcaster_loc
Set Firedummys[(Integer A)] = (Last created unit)
Uhm, that's all i have to say, they need some more trigger work, but afterwards they could be nice though.
05-13-2007, 05:55 PM#13
Dil999
I would suggest activating the trigger (setting variables, etc) with one trigger, and using a timer to move him. Timers are accurate to .02.