HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggered spell help

03-18-2011, 07:36 PM#1
Fasolace
Hello I need some help for a spell I'm making.
Note that the dummy already has the ability from the Object Editor, so there is no need to add Carrion Swarm via a trigger.

The idea is to make a Beastmaster throw two axes via 2 dummies using carrion swarm abilities. But for some reason, only the "left" Carrion Swarm is fired.
Here is the trigger.

Trigger:
Collapse Events
Unit - A unit starts the effect of an ability
Collapse Conditions
(Ability being cast) equal to Carrion Swarm
Collapse Actions
Set Ability_CarrionSwarm_Caster = (Casting unit)
- Left -
Set Temp_Point = ((Position of Ability_CarrionSwarm_Caster) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) + 45.00) degrees)
Unit - Create 1 Dummy for (Owner of Ability_CarrionSwarm_Caster) at Temp_Point facing (Facing angle of Ability_CarrionSwarm_Caster) degrees)
Unit - Add a 2.00 second Generic Expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Temp_Point)
Set Temp_Point = ((Target point of ability being cast) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) + 45.00) degrees)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)
- Right -
Set Temp_Point = ((Position of Ability_CarrionSwarm_Caster) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) - 45.00) degrees)
Unit - Create 1 Dummy for (Owner of Ability_CarrionSwarm_Caster) at Temp_Point facing (Facing angle of Ability_CarrionSwarm_Caster) degrees)
Unit - Add a 2.00 second Generic Expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Temp_Point)
Set Temp_Point = ((Target point of ability being cast) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) - 45.00) degrees)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)

EDIT: Solved. Lol why do I always solve things right after I post them? Geez.
Problem was that Temp_Point = Target point of ability being cast (the "Right" one), refered to the carrion swarmed cast by the "Left" dummy. Solved it by storing the original cast point with a variable.
03-19-2011, 08:16 PM#2
Anitarf
Just a heads up: you are still leaking half of your locations: "position of unit", "target point of ability being cast" and "location offset by distance towards angle" are two separate locations and you are only removing the latter.
03-20-2011, 03:15 PM#3
CeDiL
Quote:
Originally Posted by Fasolace
Hello I need some help for a spell I'm making.
Note that the dummy already has the ability from the Object Editor, so there is no need to add Carrion Swarm via a trigger.

The idea is to make a Beastmaster throw two axes via 2 dummies using carrion swarm abilities. But for some reason, only the "left" Carrion Swarm is fired.
Here is the trigger.

Trigger:
Collapse Events
Unit - A unit starts the effect of an ability
Collapse Conditions
(Ability being cast) equal to Carrion Swarm
Collapse Actions
Set Ability_CarrionSwarm_Caster = (Casting unit)
- Left -
Set Temp_Point = ((Position of Ability_CarrionSwarm_Caster) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) + 45.00) degrees)
Unit - Create 1 Dummy for (Owner of Ability_CarrionSwarm_Caster) at Temp_Point facing (Facing angle of Ability_CarrionSwarm_Caster) degrees)
Unit - Add a 2.00 second Generic Expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Temp_Point)
Set Temp_Point = ((Target point of ability being cast) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) + 45.00) degrees)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)
- Right -
Set Temp_Point = ((Position of Ability_CarrionSwarm_Caster) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) - 45.00) degrees)
Unit - Create 1 Dummy for (Owner of Ability_CarrionSwarm_Caster) at Temp_Point facing (Facing angle of Ability_CarrionSwarm_Caster) degrees)
Unit - Add a 2.00 second Generic Expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Temp_Point)
Set Temp_Point = ((Target point of ability being cast) offset by 35.00 towards ((Facing of Ability_CarrionSwarm_Caster) - 45.00) degrees)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)

EDIT: Solved. Lol why do I always solve things right after I post them? Geez.
Problem was that Temp_Point = Target point of ability being cast (the "Right" one), refered to the carrion swarmed cast by the "Left" dummy. Solved it by storing the original cast point with a variable.


I see a good start in your GUI triggering, i think its time for you to start learning Jass.