• 🏆 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!

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?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
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.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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