• 🏆 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] TriggerSleepAction woes

Status
Not open for further replies.
Level 8
Joined
Mar 20, 2007
Messages
224
Alright, my codes:

JASS:
function IONSTRIKE_ACTIONS takes unit marker returns nothing
    local effect array SFX
    local integer i = 0    
    
    call SetUnitScalePercent(marker, 15, 15, 15)
    call TriggerSleepAction(0.75)
    call SetUnitScalePercent(marker, 500, 500, 500)
    loop
        exitwhen i == 24
        set i = i + 1
        set SFX[i] = AddSpecialEffectTarget("origin", marker, "Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl")
    endloop
    call TriggerSleepAction(0.25)
    call UnitDamagePointLoc(marker, 0, 1200, GetRectCenter(GetPlayableMapRect()), 9001.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL)
    call TriggerSleepAction(3.75)
    set i = 0
    loop
        exitwhen i == 24
        set i = i + 1
        call DestroyEffect(SFX[i])
        set SFX[i] = null
    endloop    
    call RemoveUnit(marker)
endfunction

function SPEC_IONSTRIKE takes unit victim returns nothing
    local unit marker = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'ncp3', GetUnitX(victim), GetUnitY(victim), 0)
    call IONSTRIKE_ACTIONS(marker)
endfunction

function blah blah blah...
    ForGroup(units, SPEC_IONSTRIKE)
endfunction

Thanks to BoneBreaker for helping me get that for. However, this is what happens ingame.

- A Circle of Power ('ncp3') is created at the unit's feet.
- It is resized to scale 15, 15, 15.
- That's it.

So, I deduct, that something happens when it comes across the first TriggerSleepAction.

Any insight on my problem?
 
Last edited by a moderator:
Status
Not open for further replies.
Top