• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Why wont work?

Status
Not open for further replies.
Level 7
Joined
May 23, 2011
Messages
179
  • Earthquake
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Earthquakes Thors
    • Actions
      • Animation - Change (Casting unit) flying height to 0.00 at 0.00
      • Wait 0.09 seconds
      • Animation - Change (Casting unit) flying height to 250.00 at 0.00
      • Wait 0.29 seconds
      • Animation - Change (Casting unit) flying height to 500.00 at 0.00
      • Wait 0.39 seconds
      • Animation - Change (Casting unit) flying height to 750.00 at 0.00
      • Wait 0.49 seconds
      • Animation - Change (Casting unit) flying height to 1000.00 at 0.00
      • Wait 0.59 seconds
      • Animation - Change (Casting unit) flying height to 750.00 at 0.00
      • Wait 0.69 seconds
      • Animation - Change (Casting unit) flying height to 500.00 at 0.00
      • Wait 0.79 seconds
      • Animation - Change (Casting unit) flying height to 250.00 at 0.00
      • Wait 0.89 seconds
      • Animation - Change (Casting unit) flying height to 0.00 at 0.00
Thanks
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
At first, if unit does not have movement type - flying you cant change flying height.
Don't worry, there is a solution:
You have to add crown form ability, and since if added once unit's flying height can be change till the game ends we can remove it instantly after.

  • Unit - Add Crown to Yourunit
  • Unit - Remove Crown form from Yourunit
Now your unit can fly :D

Don't use waits, better use loops with duration stored in real variables - you need knowledge about hashtables or indexeing systems to do that properly.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Casting Unit and other function response stuff (Triggering Unit etc.)
Isnt wait friendly.
Apparently, Wait can be used and still maintain its stability (not bug) with only (Triggering unit). It is because it is referred as default local unit in GUI. Therefore, you can use Wait for only (Triggering unit) and it still works, very well.

At Thread:
You know that the formula of Speed = Distance / Time, right ?
The way I see it, you wanna make your unit to fly accordingly with a "timed" speed of interval of initially 9 seconds, next is 20 seconds, and rest it 10 seconds interval.

I have attached a test map for you
Type "-time <your value>" to change the time taken for the unit to fly to designated height.
Example: -time 3, this mean that the unit will fly to the height of certain height (can be modified in Setup Trigger and in-game) in 3 seconds time.

For changing height in-game, type "-height <your value>"
Example: -height 500

This Flight System works well if you wanna have a different Speed at all time.
Initial Settings: Height = 500 range of y-axis | Time Taken = 1 second

It is completely MUI.
 

Attachments

  • Flight System.w3x
    13.8 KB · Views: 32
Last edited:
Status
Not open for further replies.
Top