• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

My twisting trigger doesn't work, why?

Status
Not open for further replies.
Level 4
Joined
Jun 15, 2010
Messages
67
I've made a twisting trigger ability but in about 1/3 of duration time it stops. I don't know why, just take a look:

  • Trigger 1
    • Events
      • Unit - A unit begins to cast a spell
    • Conditions
      • (Ability being cast) Equal to Twist
    • Actions
      • Set CASTER = (Triggering unit)
      • Set TARGET = (Target unit of ability being cast)
      • Unit - Pause TARGET
      • Trigger - Run Trigger 2<gen> (ignoring conditions)
  • Trigger 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set ANGLE = (Facing of TARGET)
      • Unit - Make TARGET face ((Facing of TARGET) + 30) over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Facing of TARGET) Equal to ANGLE
        • Then - Actions
          • Trigger - Run Trigger 3<gen> (ignoring conditions)
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
  • Trigger 3
    • Events
    • Conditions
    • Actions
      • Unit - Cause CASTER to damage TARGET dealing 200.00 damage of attack type Chaos and damage type Normal
      • Unit - Unpause TARGET
The variables are:
CASTER (unit)
TARGET (unit)
ANGLE (real)

Have I made any mistake somewhere? I said what's the problem, if you can help please post here and correct my triggers.
 
Level 4
Joined
Jun 15, 2010
Messages
67
Now it looks like you told me to do and problem still exists:

  • Trigger 1
    • Events
      • Unit - A unit begins to cast a spell
    • Conditions
      • (Ability being cast) Equal to Twist
    • Actions
      • Set CASTER = (Triggering unit)
      • Set TARGET = (Target unit of ability being cast)
      • Set ANGLE = (Facing of (Target unit of ability being cast))
      • Unit - Pause (Target unit of ability being cast)
      • Trigger - Turn on Trigger 2<gen>
  • Trigger 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Make TARGET face (ANGLE + 30.00) over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Facing of TARGET) Equal to ANGLE
        • Then - Actions
          • Unit - Cause CASTER to damage TARGET, dealing 200.00 damage of attack type Chaos and damage type Normal
          • Unit - Unpause TARGET
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
Still doesn't work :cry:
 
Level 4
Joined
Jun 15, 2010
Messages
67
woow, i made it. i changed ANGLE to:
  • Set ANGLE = ((Facing of (Target unit of ability being cast)) - 30.00)
but now it doesn't stop :D
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Of course it won't stop. The Facing of TARGET will never be equal to ANGLE, which is your condition in trigger 2.

Take the two triggers you posted earlier, and change the first action of trigger 2 to ''Unit - Make TARGET face (Facing of TARGET) + 30) over 0.00 seconds)'' instead of ''ANGLE + 30''.
 
Level 4
Joined
Jun 15, 2010
Messages
67
  • Trigger 1
    • Events
      • Unit - A unit begins to cast a spell
    • Conditions
      • (Ability being cast) Equal to Twist
    • Actions
      • Set CASTER = (Triggering unit)
      • Set TARGET = (Target unit of ability being cast)
      • Set ANGLE = ((Facing of (Target unit of ability being cast)) - 30.00)
      • Unit - Pause (Target unit of ability being cast)
      • Trigger - Turn on Trigger 2<gen>
  • Trigger 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Make TARGET face ((Facing of TARGET) + 30.00) over 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Facing of TARGET) Equal to ANGLE
        • Then - Actions
          • Unit - Cause CASTER to damage TARGET, dealing 200.00 damage of attack type Chaos and damage type Normal
          • Unit - Unpause TARGET
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
I think I'm gonna request such ability and let Pharoh_ or you do that :D
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
I don't get why it won't work. x(

Try this:

  • Trigger 1
    • Events
      • Unit - A unit begins to cast a spell
    • Conditions
      • (Ability being cast) Equal to Twist
    • Actions
      • Set CASTER = (Triggering unit)
      • Set TARGET = (Target unit of ability being cast)
      • Set ANGLE = ((Facing of (Target unit of ability being cast)) - 30.00)
      • Unit - Pause (Target unit of ability being cast)
      • Trigger - Turn on Trigger 2<gen>
      • Wait 0.36 seconds (0.03*30)
      • Trigger - Turn off Trigger 2<gen>
      • Unit - Cause CASTER to damage TARGET, dealing 200.00 damage of attack type Chaos and damage type Normal
      • Unit - Unpause TARGET
  • Trigger 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Make TARGET face ((Facing of TARGET) + 30.00) over 0.00 seconds
 
Status
Not open for further replies.
Top