• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Unit gets attacked and flys to region.

Status
Not open for further replies.
In my cinematic a unit gets hit by another unit and is supposed to fly to the region and play the death animation while flying. Is there a way i can do this?
shi- sorry about the prefix didn't notice the thread saying not to...
Here is a reference video http://www.youtube.com/watch?v=gmlZsg0rHRM&feature=response_watch at one part when the unit is hitting the units and they fly in the air is my question.
 
Last edited:
Level 18
Joined
Aug 23, 2008
Messages
2,319
There's a problem with changing animations or animation speed while the unit is moving or it's flying height is changed. Maybe there's a solution, but then someone needs to do a lot of testing. The probably only other way would be to change the death animation.
 
Forget it; didn't realize what exactly were you up to, until i saw the video. In that case:
  • Trigger
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Unit - Add Crow Form to (Your unit)
    • Unit - Remove Crow Form from (your unit)
  • Trigger1
  • Events
    • (Your unit) takes damage
  • Conditions
  • Actions
    • Actions
      • Set Point = (Position of (your unit))
      • Set Point2 = (Point offset by 300.00 towards ((Facing of (your unit)) - 180) degrees)
      • Trigger - Turn on Trigger2 <gen>
      • Custom script: call RemoveLocation (udg_Point)
  • Trigger2
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set PointX = (Position of (Your unit))
      • Set PointZ = ((PointX) offset by 20.00 towards (Angle from (PointX) to (Point2))
      • Unit - Move (Your unit) instantly to (PointZ)
      • Unit - Set the custom value of (Your unit) to (((Custom value of (Your unit)) + 1)
      • Set F_Real_Grenade_FlyHeight = ((Power(60.00, 2.00)) - (Power(((Real((Custom value of (Your unit))) - 60.00), 2.00)))
      • Animation - Change (Your unit's) flying height to (F_Real_Grenade_FlyHeight / (3600.00 / F_Real_Set_Height)) at 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Your unit)) Greater than or equal to 120
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Set the custom value of (Your unit) to 0
          • Custom script: call RemoveLocation (udg_Point2)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_PointX)
      • Custom script: call RemoveLocation (udg_PointZ)
 
Level 8
Joined
Aug 1, 2008
Messages
420
question: If you add then remove crow form straight away, can you still change their flying height?...
 
Why do you say it by now? No, the trigger i gave you works for 1 unit only. In order to make 2 units, have this:
In the map initialization trigger,
  • Set Temp_Group = (Units in (Your region) matching ((Unit-type of (Matching unit) Equal to Your unit type)
  • Unit Group - Pick up every unit in (Temp_group) and do (Actions)
    • Loop - Actions
      • Set Unit = (Picked unit)
      • Trigger - Add to Trigger1 the event (Unit - (Unit1) takes damage)
  • Custom script: call DestroyGroup (udg_Temp_Group)
And then, wherever i claim the "your unit", place the "Unit1" variable.
 
Ok, look, i am also jealous of some models i have seen and wanna make my own, but i can't do it, unless i know some basic stuff about modelling, or even having basic programs to do so. Variables is the most basic stuff in GUI triggering.
The variables i used are: "Temp_Group" = Unit Group, "Unit" = Unit, "Point/Point2/PointX/PointZ" = Point, "F_Real_Grenade_Flight" = Real.
I suggest you had a look at this for an at least basic way of triggering: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
 
Status
Not open for further replies.
Top