• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

attack speed boost JASS help

Status
Not open for further replies.
Level 4
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?
 
Status
Not open for further replies.
Top