HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Height Rate

06-27-2007, 04:35 PM#1
Silvenon
Hello everyone,

Here's the thing what's bugging me.....what is exactly rate in SetUnitFlyHeight? (in GUI it's Animation - Set Unit Flying Height) How do I use properly? This is a Jump function made by Mapz Maker:

Collapse JASS:
function Jump takes unit u, real height, real rate returns nothing
    set bj_enumDestructableRadius = height
    set bj_lastTransmissionDuration = rate
    set bj_groupRandomCurrentPick = u
    call ExecuteFunc( "Jump_Exec" )
endfunction

function Jump_Exec takes nothing returns nothing
    local unit u = bj_groupRandomCurrentPick
    local real h = bj_enumDestructableRadius
    local real r = bj_lastTransmissionDuration
    call SetUnitPathing( u, false )
    call UnitAddAbility(u,'Amrf' )
    call UnitRemoveAbility(u,'Amrf')
    call SetUnitFlyHeight( u, h, r )
    call TriggerSleepAction(.3)
    call SetUnitFlyHeight( u, 0, r )
    call TriggerSleepAction(.3)
    call SetUnitPathing( u, true )
endfunction

What rate should I put if I want the unit to jump and land when it reaches a certain distance? I hope I've been clear enough..... Thanks in advance :)
06-27-2007, 05:20 PM#2
Ammorth
The rate is how many units it will change in 1 second. So 1000 units makes it change height at the speed of 1000 units per second.

The spell uses the same idea, the speed the unit raises and lowers.
06-28-2007, 09:35 AM#3
Silvenon
Oh, thanks :D