• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Custom Script Section

Status
Not open for further replies.
Level 6
Joined
May 19, 2004
Messages
267
why doesnt this work?

Custom Script Section
Code:
function Clumsy takes nothing returns nothing
    local integer i=udg_tempInteger
    local unit u=udg_tempTarget[i]
    call SetUnitMoveSpeed( u, ( GetUnitMoveSpeed(u) / 2.00 ) )
    call PolledWait( 30.00 )
    call SetUnitMoveSpeed( u, GetUnitDefaultMoveSpeed(u) )
endfunction
Code:
Spells
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to Clumsy 
    Actions
        Set tempInteger = (Player number of (Owner of (Casting unit)))
        Set tempCaster[tempInteger] = (Casting unit)
        Set tempTarget[tempInteger] = (Target unit of ability being cast)
        If ((Ability being cast) Equal to Fireball AA) then do (Set tempAbility = Fireball AA) else do (Do nothing)
        If ((Ability being cast) Equal to Fireball AA) then do (Trigger - Run FireDamage spells <gen> (checking conditions)) else do (Do nothing)
        If ((Ability being cast) Equal to Clumsy ) then do (Set tempAbility = Clumsy ) else do (Do nothing)
        If ((Ability being cast) Equal to Clumsy ) then do (Custom script: call Clumsy) else do (Do nothing)

EDIT:
nvm problem solved.
 
Status
Not open for further replies.
Top