- Joined
- Dec 10, 2008
- Messages
- 850
Ok, so today I download JassCraft, and made a trigger in it, and it clears with WE, but every time I cast the spell BOOM, crash. I get no real clue what happened, since I just started JASS.
I know its full of BJs and probably tins of other evil things, but my native list disapeared to I dont no were it is....
Please help.
(and I'll +rep you if you do!)
JASS:
function Trig_LightningCross_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_LightningCross_Copy_Actions takes nothing returns nothing
local unit udg_LightningCrossCast
local real udg_LightningCrossReal1
local real udg_LightningCrossReal2
local real udg_LightningCrossReal3
local real udg_LightningCrossReal4
local location udg_LightningCrossLoc1
local location udg_LightningCrossLoc2
local location udg_LightningCrossLoc3
local location udg_LightningCrossLoc4
set udg_LightningCrossCast = GetSpellAbilityUnit()
set udg_LightningCrossReal1 = 0.00
set udg_LightningCrossReal2 = 0.00
set udg_LightningCrossReal3 = 0.00
set udg_LightningCrossReal4 = 0.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_LightningCrossLoc1 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal1, 90.00)
set udg_LightningCrossLoc2 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal2, 0.00)
set udg_LightningCrossLoc3 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal3, 180.00)
set udg_LightningCrossLoc4 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal4, 270.00)
call AddSpecialEffectLocBJ( udg_LightningCrossLoc1, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc2, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc3, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc4, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_LightningCrossReal1 = ( udg_LightningCrossReal1 + 50.00 )
set udg_LightningCrossReal2 = ( udg_LightningCrossReal2 + 50.00 )
set udg_LightningCrossReal3 = ( udg_LightningCrossReal3 + 50.00 )
set udg_LightningCrossReal4 = ( udg_LightningCrossReal4 + 50.00 )
call RemoveLocation(udg_LightningCrossLoc1)
call RemoveLocation(udg_LightningCrossLoc2)
call RemoveLocation(udg_LightningCrossLoc3)
call RemoveLocation(udg_LightningCrossLoc4)
call TriggerSleepAction( 0.01 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_LightningCrossLoc1 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal1, 90.00)
set udg_LightningCrossLoc2 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal2, 0.00)
set udg_LightningCrossLoc3 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal3, 180.00)
set udg_LightningCrossLoc4 = PolarProjectionBJ(GetUnitLoc(udg_LightningCrossCast), udg_LightningCrossReal4, 270.00)
call AddSpecialEffectLocBJ( udg_LightningCrossLoc1, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc2, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc3, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LightningCrossLoc4, "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_LightningCrossReal1 = ( udg_LightningCrossReal1 - 50.00 )
set udg_LightningCrossReal2 = ( udg_LightningCrossReal2 - 50.00 )
set udg_LightningCrossReal3 = ( udg_LightningCrossReal3 - 50.00 )
set udg_LightningCrossReal4 = ( udg_LightningCrossReal4 - 50.00 )
call RemoveLocation(udg_LightningCrossLoc1)
call RemoveLocation(udg_LightningCrossLoc2)
call RemoveLocation(udg_LightningCrossLoc3)
call RemoveLocation(udg_LightningCrossLoc4)
call TriggerSleepAction( 0.01 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_LightningCrossCast = null
endfunction
//===========================================================================
function InitTrig_LightningCross_Copy takes nothing returns nothing
local trigger gg_trg_LightningCross_Copy
set gg_trg_LightningCross_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_LightningCross_Copy, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_LightningCross_Copy, Condition( function Trig_LightningCross_Copy_Conditions ) )
call TriggerAddAction( gg_trg_LightningCross_Copy, function Trig_LightningCross_Copy_Actions )
endfunction
Please help.
(and I'll +rep you if you do!)