• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Why dont work this script pls help :)

Status
Not open for further replies.
Level 4
Joined
Nov 3, 2004
Messages
79
JASS:
function Trig_Nova_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A000' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Nova_Actions takes nothing returns nothing
    local unit caster = GetSpellAbilityUnit()
    local real MaxRange = 900.00
    local real StartRange = 0.00
    local real RangeJumps = 50.00
    local effect NovaEffect
    local string EffectPreBase
    local real Arrounder
    local location NovaPoint

    set NovaPoint = (GetUnitLoc(caster))
    set EffectPreBase = "Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl"
    loop
        exitwhen StartRange == MaxRange
        call TriggerSleepAction(0.01)
        loop
            exitwhen Arrounder == 360.00
            call TriggerSleepAction(0.01)
            set Arrounder = Arrounder + 12.00
            call DestroyEffect(NovaEffect)
            call AddSpecialEffectLocBJ( PolarProjectionBJ(NovaPoint, StartRange, Arrounder), EffectPreBase )
            set NovaEffect = GetLastCreatedEffectBJ()
        endloop
        set StartRange = StartRange + RangeJumps
    endloop
    call RemoveLocation(NovaPoint)
    set Arrounder = 0.00
    set caster = null
endfunction

//===========================================================================
function InitTrig_Nova takes nothing returns nothing
    set gg_trg_Nova = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Nova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Nova, Condition( function Trig_Nova_Conditions ) )
    call TriggerAddAction( gg_trg_Nova, function Trig_Nova_Actions )
endfunction
I dont know whats false :(
 
Level 12
Joined
Apr 29, 2005
Messages
999
Make the spell display text in the game at some specific actions so you know how much that works. I always do that. Set some text after the variables has been defined so you know that the script works so far and some text in the loop telling what happens. This will help you figure out what part is wrong.
 
Status
Not open for further replies.
Top