As the very long title says, I am trying to work out a trigger so that when a unit is in the air (ie. Jumping) they won't drop down or raise up when the ground level below them changes.
I believe for flying units you can make it so that they ignore ground height, but this unit is no flying, so it does not apply.
I am using ArcadeRenegade's Gravity Jump un altered. And then I have created another trigger which is turned on for the duration of the jump.
What the trigger does is find the difference between the current ground height at the unit's position and the ground height at the unit's position 0.05s ago, and then adds it to the unit's height, or subtracts if the difference is negative.
HeightEventsTimer-Every0.05secondsofGameTimeLocalVariables_height=(Groundheightat(PositionofMurlocMarine[8.50,12.50])) <Real>
Conditions
Actions
Unit - Change Murloc Marine [8.50,12.50] height to ((Height of Murloc Marine [8.50,12.50]) + (_height - (Ground height at (Position of Murloc Marine [8.50,12.50])))) over 0.05 seconds
Variable - Set _height = (Ground height at (Position of Murloc Marine [8.50,12.50]))
But this doesn't seem to work, it just makes the jump go way up off the screen. Does anyone know what the problem might be, or how else I could achieve this.
SetUnitZ takes a unit the Z and the movementtype (ground,air,floating)
and GetUnitZ
with this functions you can get the units z at the beginning and work the whole time with the Z offset and not with the ground offset. if you want to check if the unit lands just make a if the else and look if the current flying height is <= 0.01
As the very long title says, I am trying to work out a trigger so that when a unit is in the air (ie. Jumping) they won't drop down or raise up when the ground level below them changes.
I believe for flying units you can make it so that they ignore ground height, but this unit is no flying, so it does not apply.
I am using ArcadeRenegade's Gravity Jump un altered. And then I have created another trigger which is turned on for the duration of the jump.
What the trigger does is find the difference between the current ground height at the unit's position and the ground height at the unit's position 0.05s ago, and then adds it to the unit's height, or subtracts if the difference is negative.
But this doesn't seem to work, it just makes the jump go way up off the screen. Does anyone know what the problem might be, or how else I could achieve this.
easy thing....
check this here (a small thing i made)
It isn't localized :( Can't read a thing, and the Sc2 Localizer doesn't seem to work for me.
strange :/
ok you should use 2 custom functions:
SetUnitZ takes a unit the Z and the movementtype (ground,air,floating)
and GetUnitZ
with this functions you can get the units z at the beginning and work the whole time with the Z offset and not with the ground offset. if you want to check if the unit lands just make a if the else and look if the current flying height is <= 0.01
(sry for some german things in the functions)
EDIT: made a paste for the triggers http://paste.sc2mapster.com/2392/