D.V.D
Make a wish
- Reaction score
- 73
How is it done? For example, a projectile's speed is set to 1. How much does the projectile move per 0.03 seconds?
Well, that depends on what you want :S
If you want Range/second then I'd suggest you do something like:
Actually i think that the projectile speed is the amount of units a projectile moves per second.
Alright, Ill stick to that. Thanks +rep
I don't quite understand.
of course. speed is Distance over Time.So 500 projectile speed would be 500 distance per second.
maybe the unit took time to turn?.. sometimes they have to turn a certain angle before they start to move.I've tested move speed before. 522 move speed didn't give me the exact value of 522 distance. However, it did give me somewhere close to that value.
globals
real x
endglobals
function CheckDist takes nothing returns nothing
local real x1 = GetUnitX( gg_unit_Hpal_0003 )
call DisplayTextToPlayer( Player( 0 ), 0.0, 0.0, R2S( DistanceBetweenPoints( Location( x, GetUnitY( gg_unit_Hpal_0003 ) ), Location( x1, GetUnitY( gg_unit_Hpal_0003 ) ) ) ) )
endfunction
function Trig_Speed_Test_Actions takes nothing returns nothing
local timer t = CreateTimer()
set x = GetUnitX( gg_unit_Hpal_0003 )
call IssuePointOrder( gg_unit_Hpal_0003, "move", GetUnitX( gg_unit_Hpal_0003 ) + 500, GetUnitY( gg_unit_Hpal_0003 ) )
call TimerStart( t, 1., false, function CheckDist )
endfunction
//===========================================================================
function InitTrig_Speed_Test takes nothing returns nothing
set gg_trg_Speed_Test = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_Speed_Test, 2., false )
call TriggerAddAction( gg_trg_Speed_Test, function Trig_Speed_Test_Actions )
call SetUnitFacing( gg_unit_Hpal_0003, 0. )
endfunction