Hello Hive I'm back! Been busy with college work no map making until my recent project - Crazy Catas!
Problem is, I need a way move projectiles effectively.
I thought of having an overall engine trigger to handle projectile moving and planned to use the unit's custom value to store the vertical velocity but I remembered custom value is only for integers. It's possible I could do this if I used a very large integer and then divide it to minimise the loss of accuracy provided by decimals but I would prefer not to.
Before I left I was just discovering H2R and such functions and never really understood them. I know they are used to attach values to objects like timers. This would be perfect but I know that Blizzard changed those functions when they updated a while ago.
So could anyone explain how to use H2R to so that I may store the vertical velocity of a unit and pass it to the next iteration?
it would be something like this:
function CreateProj()
set z.velocity
create timer(function MoveProj)
endfunction
funtion MoveProj()
destroy timer
get z.velocity
if z.value <= 0 then
call ProjDeath(unit)
else
set new z.velocity
create time(function MoveProj())
endif
endfunction
K gotta go to work hopefully there will be a coherant answer when i get back
Thanks,
Sabre2th
Problem is, I need a way move projectiles effectively.
I thought of having an overall engine trigger to handle projectile moving and planned to use the unit's custom value to store the vertical velocity but I remembered custom value is only for integers. It's possible I could do this if I used a very large integer and then divide it to minimise the loss of accuracy provided by decimals but I would prefer not to.
Before I left I was just discovering H2R and such functions and never really understood them. I know they are used to attach values to objects like timers. This would be perfect but I know that Blizzard changed those functions when they updated a while ago.
So could anyone explain how to use H2R to so that I may store the vertical velocity of a unit and pass it to the next iteration?
it would be something like this:
function CreateProj()
set z.velocity
create timer(function MoveProj)
endfunction
funtion MoveProj()
destroy timer
get z.velocity
if z.value <= 0 then
call ProjDeath(unit)
else
set new z.velocity
create time(function MoveProj())
endif
endfunction
K gotta go to work hopefully there will be a coherant answer when i get back
Thanks,
Sabre2th