- Joined
- Jul 16, 2009
- Messages
- 42
JASS:
function Trig_attackspeedbonus01_Conditions takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem()) == 'I007'
endfunction
function Trig_attackspeedbonus01_Actions takes nothing returns nothing
local unit caster
local unit u = GetTriggerUnit()
set caster = CreateUnitAtLoc( GetOwningPlayer(u), 'h000', GetUnitLoc(u), 90 )
call UnitAddAbility( caster, 'A005' )
call IssueTargetOrder(caster, "bloodlust", u)
set caster = null
endfunction
//===========================================================================
function InitTrig_attackspeedbonus01 takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( t, Condition( function Trig_attackspeedbonus01_Conditions ) )
call TriggerAddAction( t, function Trig_attackspeedbonus01_Actions )
endfunction
k so since there is no rune power up for attack speed, i decided to make one. I made an item(I007) an ability(bloodlust/A005) and a caster(footman/h000) unit. This script was suppose to activate when a unit picks up and item. the invisible caster is suppose to appear and cast blood lust on triggering unit.
I dont know what the problem is exactly but when i make the caster visable again he doesnt seem to show up, meaning he wasnt ever summon. can someoen look over my script and see what i did wrong?