- Joined
- Jul 17, 2006
- Messages
- 145
alright, im using this jass script here and its not working...at all. I the ability and it dosent do anything......
Code:
function Rocket_Engines_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A04D'
endfunction
function Rocket_Engines_Knockback takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit cast = GetAttachedUnit(t, "cast")
local integer steps = GetAttachedInt(t, "steps")
call SetUnitPositionLoc(cast, PolarProjectionBJ(GetUnitLoc(cast), 2.5, GetUnitFacing(cast)))
set cast = null
set t = null
if (steps <= 1) then
call FlushHandle(t)
call DestroyTimer(t)
return
endif
call AttachInt(t, "steps", steps-1)
endfunction
function Rocket_Engines_Actions takes nothing returns nothing
local timer t
local real channeltime
local unit cast = GetTriggerUnit()
local real steps
set channeltime = 5.00
set steps = channeltime/.025
call AttachInt(t, "steps", R2I(steps))
call AttachObject(t, "cast", cast)
call TimerStart(t, .025, true, function Rocket_Engines_Knockback)
set cast = null
set t = null
set channeltime = 0
endfunction
//===========================================================================
function InitTrig_Captian_Germross_Rocket_Engines takes nothing returns nothing
set gg_trg_Captian_Germross_Rocket_Engines = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Captian_Germross_Rocket_Engines, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Captian_Germross_Rocket_Engines, Condition( function Rocket_Engines_Conditions ) )
call TriggerAddAction( gg_trg_Captian_Germross_Rocket_Engines, function Rocket_Engines_Actions )
endfunction
[\code]
I am using a cache system that can be found here:
http://forums.dota-allstars.com/index.php?showtopic=92616
(the first shown script)
all help is appreciated.