• 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.

Math Thing

Status
Not open for further replies.
Level 7
Joined
Nov 18, 2012
Messages
272
Hello.

I need a fix to this trigger.
  • Set M_ZSpeed = (((M_TargetHeight[(Integer A)] - (Current flying height of M_UnitIndex[(Integer A)])) x 0.02) x ((M_Distance x 1.50) / ((Current movement speed of M_UnitIndex[(Integer A)]) + ((Real((Level of Speed for M_UnitIndex[(Integer A)]))) x M_Modifier
  • Animation - Change M_UnitIndex[(Integer A)] flying height to ((Current flying height of M_UnitIndex[(Integer A)]) + M_ZSpeed) at 10000.00
It's a unit that raises it's height depending on the distance. I want to make it reach it's height when it reaches the target.

Can someone help me?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
integer A is slower and buggy at times
No it is not. Slower, perhaps, but that is for other reasons. Buggy it is not.

Can someone help me?
If you explain what variables you have etc.

The way I would go about it is compute a constant Z velocity at cast time based on...
((target height) - (current height)) / (number of cycles to reach target)
And add this to the unit's height every cycle.
 
i have looked at it in jass lol. ive tested it for efficiency. try making a loop with ur own integer and with Integer A put create unit and display the number. Integer A is always lower than ur own integer by 50 + instances.
Im not sure y it bugged and it really shouldnt be able to. I do know when i switched it over to my own integer the bug dissapeared. I was a noob back then and didnt bother to look for the reason y.
 
Status
Not open for further replies.
Top