• 🏆 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!

[JASS] elows... help in jass..

Status
Not open for further replies.
Level 5
Joined
Apr 16, 2005
Messages
135
elow to anybody who cares.. =D

i got question about a jass skill..

The thunder Slam...

i copied the triggers pasted the jass things in the upper script and changed the A000things to my A000things..

but when i try to save it deisplays an errors that says..

Expected a name
Expected a code statement
Expected a function name

y is that?.. how can i fix this.. =D thnx advnce.. =D

:lol:
 
Level 5
Joined
Apr 16, 2005
Messages
135
heres the spell

my thunder slam is A00V


[/code]
function Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00V' ) ) then // Replace 'A007' with the code for your Thunder Slam ability
return false
endif
return true
endfunction

function Main takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
set udg_TS_Caster = GetSpellAbilityUnit()
call SetUnitInvulnerable( caster, true )
call PauseUnitBJ( true, caster )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = GetRandomInt(4, ( 3 + GetUnitAbilityLevelSwapped('A00V', caster) )) // Replace 'A007' with the code for your Thunder Slam ability
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerExecute( gg_trg_Effects )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( I2R(GetForLoopIndexA()) )
call ResetUnitAnimation( caster )
call SetUnitInvulnerable( caster, false )
call PauseUnitBJ( false, caster )
endfunction

//===========================================================================
function InitTrig_Main takes nothing returns nothing
set gg_trg_Main = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Main, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Main, Condition( function Conditions ) )
call TriggerAddAction( gg_trg_Main, function Main )
endfunction


function SFX takes nothing returns nothing
local unit caster = udg_TS_Caster
local location point = PolarProjectionBJ(GetUnitLoc(udg_TS_Caster), GetRandomReal(250.00, 800.00), GetRandomReal(0.00, 360.00))
call TriggerSleepAction( I2R(GetForLoopIndexA()) )
call SetUnitAnimation( caster, "slam" )
call AddSpecialEffectLocBJ( point, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call TriggerSleepAction( 0.25 )
set udg_TS_Caster = caster
set udg_TS_Lightning_Point = point
endfunction

function AddTargets takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_TS_Targets )
endfunction

function SetTargets takes nothing returns nothing
call GroupClear( udg_TS_Targets )
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function AddTargets )
endfunction

function Damage takes nothing returns nothing
call AddSpecialEffectLocBJ( udg_TS_Lightning_Point, "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call UnitDamagePointLoc( udg_TS_Caster, 0.00, 250.00, udg_TS_Lightning_Point, ( 50.00 + ( I2R(GetUnitAbilityLevelSwapped('A00V', udg_TS_Caster)) * 50.00 ) ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_LIGHTNING ) // Replace 'A007' with the code for your Thunder Slam ability
call TriggerExecute( gg_trg_Purge )
call GroupClear( udg_TS_Targets )
endfunction

//===========================================================================
function InitTrig_Effects takes nothing returns nothing
set gg_trg_Effects = CreateTrigger( )
call DisableTrigger( gg_trg_Effects )
call TriggerAddAction( gg_trg_Effects, function SFX )
call TriggerAddAction( gg_trg_Effects, function SetTargets )
call TriggerAddAction( gg_trg_Effects, function Damage )
endfunction

JASS:
done..
 
Status
Not open for further replies.
Top