- Joined
- Aug 9, 2006
- Messages
- 2,384
JASS:
function MagmaBarricadeConditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function MagmaBarricadeSetUp takes nothing returns nothing
//local unit MagmaCaster = GetTriggerUnit()
//local player MagmaCasterOwner = GetOwningPlayer(MagmaCaster)
//local real x = GetUnitX(MagmaCaster)
//local real y = GetUnitY(MagmaCaster)
//local real x1 = 0
//local real y1 = 0
//local real facing = 0
//local group RockGroup = CreateGroup()
//local integer RockCount = 8
//local unit RockUnit
//loop
//exitwhen RockCount == 0
//set x1 = x + (GetRandomReal(200.00, 600.00)) * Cos(facing * bj_DEGTORAD )
//set y1 = y + (GetRandomReal(200.00, 600.00)) * Sin(facing * bj_DEGTORAD )
//set RockUnit = CreateUnit(MagmaCasterOwner, 'n000', x1, y1, 0.00)
//call GroupAddUnit(RockGroup, RockUnit)
//set RockCount = RockCount - 1
//set facing = facing + GetRandomReal(10, 45)
//set RockUnit = null
//endloop
endfunction
//===========================================================================
function InitTrig_MagmaBarricade takes nothing returns nothing
set gg_trg_MagmaBarricade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MagmaBarricade, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MagmaBarricade, Condition( function MagmaBarricadeConditions ) )
call TriggerAddAction( gg_trg_MagmaBarricade, function MagmaBarricadeSetUp )
endfunction
This is very weird, it crashes even when i deactivate all the problem parts in the jass trigger. It crashes my whole wc3.