• 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] Spell Problem

Status
Not open for further replies.
Level 7
Joined
Oct 8, 2008
Messages
200
Basically I want my spell to launch a dummy unit that works like a missile and when it hits the unit gets knockback. The problem is that no dmg is done and it keeps repeating and the dummy unit doesn't go to the enemy unit ( I know this probably the wrong way to trigger a spell to this description)
  • Actions
    • Set Caster = (Triggering unit)
    • Set Target = (Target unit of ability being cast)
    • Set Distance = (400.00 + (100.00 x 1.00))
    • Set Angle = (Facing of Caster)
    • Set Duration = 2.00
    • Set Point_1 = (Position of (Triggering unit))
    • Set Unit_1 = (Target unit of ability being cast)
    • Unit - Pause (Triggering unit)
    • Unit - Pause Unit_1
    • Unit - Create 1 Dummy Unit for Player 1 (Red) at Point_1 facing Default building facing degrees
    • Unit - Make Unit_2 face (Position of Unit_1) over 0.00 seconds
    • Set Unit_2 = (Last created unit)
    • Unit - Order Unit_2 to Move To (Rally-Point of Unit_1 as a point)
    • Wait 1.00 seconds
    • Custom script: call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)
    • Unit - Cause Unit_2 to damage Unit_2, dealing 100.00 damage of attack type Spells and damage type Normal
    • Unit - Remove Unit_2 from the game
    • Unit - Unpause Unit_1
    • Unit - Unpause (Triggering unit)
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • Unit - Create 1 Dummy Unit for Player 1 (Red) at Point_1 facing Default building facing degrees
  • Unit - Make Unit_2 face (Position of Unit_1) over 0.00 seconds
  • Set Unit_2 = (Last created unit)
  • Unit - Order Unit_2 to Move To (Rally-Point of Unit_1 as a point)

this is wrong... you use Unit_2 before setting it
and why are you using rally point? is your unit a building?

  • Unit - Cause Unit_2 to damage Unit_2, dealing 100.00 damage of attack type Spells and damage type Normal
why you make unit2 damage itself?


  • Set Target = (Target unit of ability being cast)
  • Set Unit_1 = (Target unit of ability being cast)
you are setting the same unit in 2 different variables

  • Unit - Pause (Triggering unit)
if you pause the caster immediatly after the skill is casted it keeps on casting for ever (it is kinda a problem) order your unit to stop or use a wait to correct this
 
Level 11
Joined
Dec 31, 2007
Messages
780
  • Custom script: call Knockback(udg_Target, udg_Distance, udg_Angle * bj_DEGTORAD, udg_Duration)
why are you making it this way?

all variables in WE are global (at least in gui) and there is no need to send them as a parameter to a trigger (if this is a trigger :p) just turn it on and then turn it off (but actually i have no idea what Knockback is)
 
Level 11
Joined
Dec 31, 2007
Messages
780
if the unit doesnt move it is because you have a problem with your knock back function... see if you are giving its parameters ok ... or... try making one by your self it isnt that hard...

EDIT: you can take a look at this
 

Attachments

  • Stupid abilities v3.0.w3x
    33 KB · Views: 45
Status
Not open for further replies.
Top