Name | Type | is_array | initial_value |
A | force | No | |
A1 | unit | No | |
AAA | effect | No | |
AR | item | No | |
B | integer | No | |
Beezuz | unit | No | |
Bluebot | unit | No | |
box | dialog | No | |
Brolyown | player | No | |
Brolypower | integer | No | 100 |
Buster1 | unit | No | |
Buster2 | unit | No | |
C1 | group | No | |
clip | item | No | |
Cloudjumpin | unit | No | |
Craterspawn | unit | Yes | |
Craterspawnnum | integer | No | |
Crazy | unit | No | |
crazyfx | effect | No | |
DBZmusic | button | No | |
dignum | integer | No | |
droppot | integer | No | |
drown | player | No | |
flyingunit | unit | No | |
fortexplodetime | timer | No | |
forttimewindow | timerdialog | No | |
gamequest | quest | No | |
gfx | effect | No | |
gokuown | player | No | |
gokupower | integer | No | 100 |
goulkilla | unit | No | UnitNull |
Halo | quest | No | |
hardornot | dialog | No | |
Helmet1 | unit | No | |
hero1 | unit | Yes | UnitNull |
heroes | group | No | |
House1no | button | No | |
House1own | player | No | |
House1yes | button | No | |
House2no | button | No | |
House2own | player | No | |
House2yes | button | No | |
Houseornot | dialog | No | |
Houseornot2 | dialog | No | |
hunter1 | unit | No | |
hyrulefind | quest | No | |
hyruleprotect | quest | No | |
jumptarg | unit | No | |
knuxvison | fogmodifier | No | |
leavetime | timerdialog | No | |
leavetimee | timer | No | |
linkmana | integer | No | 100 |
linkmanaboostrecharge | integer | No | |
linknado | effect | No | |
linknado2 | effect | No | |
linkown | player | No | |
marinez | group | No | |
Mariotechno | button | No | |
mctar2 | group | No | |
mctarg | unit | No | |
metalicabut | button | No | |
meteor | timer | No | |
Metroidmusic | button | No | |
mm | effect | No | |
mm2 | effect | No | |
mmupfx | effect | No | |
mmupfx2 | effect | No | |
MMX2music | button | No | |
monsterkill | quest | No | |
musiclist | dialog | No | |
Ninjaq | quest | No | |
no | button | No | |
nomusic | button | No | |
ominislashed | force | No | |
Ominiunit | unit | No | |
onboard | player | No | |
owasep | quest | No | |
portal | unit | No | |
randhero1 | integer | No | |
randomhero | trigger | No | |
randomtex | texttag | No | |
Rider | unit | No | |
ringquest | quest | No | |
Scoreboard | leaderboard | No | |
sephquest | quest | No | |
Siege | quest | No | |
sigmaquest | quest | No | |
Soul | quest | No | |
spiderquest | quest | No | |
SSitem | item | No | |
SSlevel | integer | No | |
timer1 | timer | No | |
timer2 | timer | No | |
Traintimer | timer | No | |
trainwindow | timerdialog | No | |
Truth | quest | No | |
unitlevel | integer | Yes | 1 |
yes | button | No | |
yoshistom | unit | No | |
zerotheme | sound | No | |
zfx | effect | No |
//<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>
// Author : CryoniC
//
// Description: Creates the special FX for the nuke
// and calculates the damage given by
// the fallout.
//<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>
//=============================================================================================================================================================
// TRIGGER CONDITIONS
//=============================================================================================================================================================
function Trig_NUKE_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e000' ) ) then
return false
endif
return true
endfunction
//=============================================================================================================================================================
// USER CREATED FUNCTIONS
//=============================================================================================================================================================
function GetNukeGameCache takes nothing returns gamecache
return gg_trg_Nuke
return null
endfunction
function StoreNukeGameCache takes nothing returns trigger
return bj_lastCreatedGameCache
return null
endfunction
function TimedSFX_Child takes nothing returns nothing
local effect tempeffect = bj_lastCreatedEffect
call PolledWait(14.00)
call DestroyEffect(tempeffect)
set tempeffect = null
endfunction
function TimedSFX takes location Loc, string Effect, real duration returns nothing
local trigger TimedSFXTrigger = CreateTrigger()
call AddSpecialEffectLocBJ( Loc, Effect )
call TriggerAddAction(TimedSFXTrigger,function TimedSFX_Child)
call TriggerExecute(TimedSFXTrigger)
call DestroyTrigger(TimedSFXTrigger)
set TimedSFXTrigger = null
endfunction
function TimedBlight takes nothing returns nothing
local real X = GetStoredRealBJ("LocationX", "Nuke", GetNukeGameCache())
local real Y = GetStoredRealBJ("LocationY", "Nuke", GetNukeGameCache())
local location Center = Location(X, Y)
call PolledWait(16.00)
call SetBlightRadiusLocBJ( false, Player(PLAYER_NEUTRAL_AGGRESSIVE), Center, 512.00 )
set Center = null
endfunction
function NukeDamage takes nothing returns nothing
call UnitDamageTargetBJ( GetSummonedUnit(),GetEnumUnit(), 175.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE )
endfunction
function RandomPointInRange takes location Center, real Radius returns location
return PolarProjectionBJ(Center, GetRandomReal(128.00, Radius), GetRandomDirectionDeg())
endfunction
//=============================================================================================================================================================
//MAIN ACTIONS FUNCTION
//=============================================================================================================================================================
function Trig_NUKE_Actions takes nothing returns nothing
local integer k = 0
local location uloc = (GetUnitLoc(GetSummonedUnit()))
local trigger TempTrigger = CreateTrigger()
local player owner = GetOwningPlayer(GetSummonedUnit())
call StoreRealBJ( GetLocationX(uloc), "LocationX", "Nuke", GetNukeGameCache() )
call StoreRealBJ( GetLocationY(uloc), "LocationY", "Nuke", GetNukeGameCache() )
call PolledWait( 4.00 )
call SetUnitTimeScalePercent( GetSummonedUnit(), 10.00 )
call SetBlightRadiusLocBJ( true, Player(PLAYER_NEUTRAL_AGGRESSIVE), uloc, 512.00 )
call TriggerAddAction(TempTrigger,function TimedBlight)
call TriggerExecute(TempTrigger)
call DestroyTrigger(TempTrigger)
set TempTrigger = null
call TerrainDeformationCraterBJ( 0.05, true, uloc, 512, -160 )
call TerrainDeformationCraterBJ( 0.05, true, uloc, 460.00, 256 )
set k = 1
loop
exitwhen k > 32
call TimedSFX( RandomPointInRange(uloc, 512.00), "Environment\\UndeadBuildingFire\\UndeadSmallBuildingFire0.mdl", 14.00 )
call TimedSFX( RandomPointInRange(uloc, 512.00), "Environment\\NightElfBuildingFire\\ElfLargeBuildingFire1.mdl", 14.00 )
call TimedSFX( PolarProjectionBJ(uloc, GetRandomReal(384.00, 512.00), (11.25 * I2R(k))), "Environment\\LargeBuildingFire\\LargeBuildingFire1.mdl", 14.00 )
set k = k + 1
endloop
set k = 1
loop
exitwhen k > 15
call ForGroupBJ( GetUnitsInRangeOfLocAll(512.00, uloc), function NukeDamage )
call PolledWait( 1.00 )
set k = k + 1
endloop
endfunction
//=============================================================================================================================================================
//MAIN TRIGGER FUNCTION
//=============================================================================================================================================================
function InitTrig_Nuke takes nothing returns nothing
local trigger NukeTrigger = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( NukeTrigger, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( NukeTrigger, Condition( function Trig_NUKE_Conditions ) )
call TriggerAddAction( NukeTrigger, function Trig_NUKE_Actions )
call InitGameCacheBJ( "Nuke.w3v" )
set gg_trg_Nuke = StoreNukeGameCache()
endfunction