• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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.
 
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:
 
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
 
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''.
 
  • 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
 
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.
Back
Top