HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Generic GUI trigger problem (thread renamed)

07-12-2007, 11:55 PM#1
Hydrolisk
This is it. I HATE this thing. Even though everything looks perfect, my Carrion Swarm ability WON'T WORK. The trigger is simply this: When the ability is cast, dummy's are created that shoot out more Swarms up, down, left, and right. Here's my code:
Trigger:
Unleash the Swarm
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Unleash the Swarm!
Collapse Actions
Set caster_p = (Position of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Unleash the Swarm! for (Triggering unit)) Equal to 2
Collapse Then - Actions
Set point = (caster_p offset by 250.00 towards 0.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 0.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 2
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 90.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 90.00 degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 2
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 180.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 180.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 2
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 270.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 270.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 2
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Collapse Else - Actions
Set point = (caster_p offset by 250.00 towards 0.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 0.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 90.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 90.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 180.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 180.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Set point = (caster_p offset by 250.00 towards 270.00 degrees)
Unit - Create 1 Dummy for Player 1 (Red) at caster_p facing 270.00 degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to 1
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Custom script: call RemoveLocation( udg_caster_p )
I HATE it!

My ability order code things are COPIED off of the ladder TC Shockwave ability!
Why the damn won't this work?

If the answer was under my nose the whole time, I'm... gonna get angry.

-

And, please. Don't tell me the code is hard to examine. I know that already.
07-13-2007, 12:22 AM#2
maximilianx
interesting, I cant really pinpoint any problems..
can you tell us what DOES happen when you cast the spell?
maybe that would help..
07-13-2007, 12:50 AM#3
Vexorian
speaking of things we hate, did you know that your sig is currently way more annoying than leetspeak? Either way.
07-13-2007, 07:10 AM#4
darkwulfv
Do a basic runthrough of checks. Make sure the dummies have the correct abilities or the correct abilities are being added, etc. etc. The error isn't always in the code.
07-13-2007, 05:43 PM#5
Hydrolisk
I'll try giving the Dummy the ability.

What happens so far, is that the dummies are created but they don't cast at all.

-

EDIT: Strange. I gave the Dummy the spell (in Object Editor), erased the "Add ability" parts in the trigger, but it still doesn't work... o.O
07-13-2007, 06:09 PM#6
Hydrolisk
******Oh my f******

Crap.
I just realized.

The dummy ability required mana. X.X


-Damn it! Double post...

-Oh my fucking God. It STILL doesn't work.
07-13-2007, 08:12 PM#7
Pyrogasm
Try using a loop?
Trigger:
Unleash the Swarm
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Unleash the Swarm!
Collapse Actions
Set caster_p = (Position of (Triggering unit))
Collapse For each (Integer A) from 1 to 4 do (Actions)
Collapse Loop - Actions
Set point = (caster_p offset by 250.00 towards (90.00*(Real(Integer A))) degrees)
Unit - Create 1 Dummy for Owner of (Triggering Unit) at caster_p facing 0.00 degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Unleash the Swarm! (Dummy) to (Last created unit)
Unit - Set level of Unleash the Swarm! (Dummy) for (Last created unit) to (Level of (Unleash the Swarm!) for (Triggering Unit))
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave point
Custom script: call RemoveLocation( udg_point )
Custom script: call RemoveLocation( udg_caster_p )
Another problem could be the order you're issuing; didn't you say that these were Carrion Swarms, not Shockwaves?
07-13-2007, 08:59 PM#8
Hydrolisk
Ahh, I'll try this.
As for the Shockwave thing, I've changed the order string on Carrion Swarm, so yeah...
07-13-2007, 09:06 PM#9
Pyrogasm
Changing the order string does nothing. Only on "Channel" and "Charge Gold and Lumber" will it actually change the order string.

Thus, just change it back to normal and order the dummy unit to Carrion Swarm...
07-13-2007, 09:38 PM#10
Hydrolisk
Thanks, this knowledge will definitely make map-making easier for me.

+Rep.