// ===========================
function H2I takes handle h returns integer
return h
return 0
endfunction
// ===========================
function LocalVars takes nothing returns gamecache
// Replace InitGameCache with a global variable!!
return InitGameCache("cache")
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleBoolean takes handle subject, string name, boolean value returns nothing
if value==false then
call FlushStoredBoolean(LocalVars(),I2S(H2I(subject)),name)
else
call StoreBoolean(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
else
call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
else
call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleBoolean takes handle subject, string name returns boolean
return GetStoredBoolean(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleGroup takes handle subject, string name returns group
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleLightning takes handle subject, string name returns lightning
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleWidget takes handle subject, string name returns widget
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction
//===============================================================
function CreateDummy takes real x, real y returns unit
local unit dummy = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u000', x, y, 0)
// call SetUnitVertexColor(dummy, 0, 0, 0, 0)
return dummy
endfunction
function AddDummyEffect takes unit dummy, string model returns nothing
local integer n = GetHandleInt(dummy, "effectCount")
call SetHandleInt(dummy, "dummyEffectCount", n+1)
call SetHandleHandle(dummy, "dummyEffect"+I2S(n+1), AddSpecialEffectTarget(model, dummy, "origin"))
endfunction
function RemoveDummy takes unit dummy returns nothing
local integer n = GetHandleInt(dummy, "effectCount")
loop
exitwhen n <= 0
call DestroyEffect(GetHandleEffect(dummy, "dummyEffect"+I2S(n)))
set n = n - 1
endloop
call FlushHandleLocals(dummy)
call RemoveUnit(dummy)
endfunction
function AddTimedLightning_Fade takes nothing returns nothing
local timer t = GetExpiredTimer()
local lightning li = GetHandleLightning(t, "lightning")
local real time = GetHandleReal(t, "time")
local real d = 0.1/time
local real r = GetLightningColorR(li)
local real g = GetLightningColorG(li)
local real b = GetLightningColorB(li)
local real a = GetLightningColorA(li)-d
call SetLightningColor(li, r, g, b, a)
if a <= 0 then
call DestroyLightning(li)
call FlushHandleLocals(t)
call DestroyTimer(t)
endif
endfunction
function AddTimedLightning_StartFade takes nothing returns nothing
call TimerStart(GetExpiredTimer(), 0.1, true, function AddTimedLightning_Fade)
endfunction
function AddTimedLightning takes string Code, real x1, real y1, real x2, real y2, real duration, real fadetime returns lightning
local timer t = CreateTimer()
local lightning li = AddLightning(Code, true, x1, y1, x2, y2)
call SetHandleHandle(t, "lightning", li)
call SetHandleReal(t, "time", fadetime)
call TimerStart(t, duration, false, function AddTimedLightning_StartFade)
return li
endfunction
function AddTimedLightningEx takes string Code, real x1, real y1, real z1, real x2, real y2, real z2, real duration, real fadetime returns lightning
local timer t = CreateTimer()
local lightning li = AddLightningEx(Code, true, x1, y1, z1, x2, y2, z2)
call SetHandleHandle(t, "lightning", li)
call SetHandleReal(t, "time", fadetime)
call TimerStart(t, duration, false, function AddTimedLightning_StartFade)
return li
endfunction
// ===========================
Name | Type | is_array | initial_value |
AllPlayers | group | No | |
Angels | group | No | |
Bandits | integer | No | |
Bandits_Groupe | group | No | |
bDoors | boolean | Yes | |
BladeMasterShadow | unit | Yes | |
BLOBBBBBBBBB | integer | No | |
blober | integer | No | |
blober_Copier | integer | No | |
BMVisibility | fogmodifier | No | |
Boucle | integervar | Yes | |
bouton1 | button | No | |
bouton2 | button | No | |
bouton3 | button | No | |
bouton4 | button | No | |
bPlayerDead | boolean | Yes | |
bSoulSmasherDead | boolean | No | false |
CasterUnit | unit | No | |
champignonscompteur | timer | No | |
Choice1 | integer | No | |
Cible_du_sort | unit | Yes | |
compteur | timer | Yes | |
creep | integer | No | |
creepdead | integer | No | |
crovaxxxxxxx | player | No | |
currentlevel | unitcode | No | |
currentlevel_num | integer | No | |
DeathVis | fogmodifier | Yes | |
dialog | dialog | No | |
dialog_Copier | dialog | No | |
Druide_TXT_Flottant | texttag | No | |
EnableSpawners | boolean | Yes | |
Entier_entropisme | integer | No | |
explorateurs | unit | Yes | |
FAKE | unit | Yes | |
fenetrecompteur | timerdialog | No | |
FlameDamage | group | No | |
FlameDamage2 | group | No | |
FlameDamage3 | group | No | |
Frequencies | integer | Yes | |
FrostFlashDamage | group | No | |
HeavenTimer | timer | No | |
HeavenTimerWindow | timerdialog | No | |
HellGroup | group | No | |
HELLTIME | timer | No | |
HellTimeWindow | timerdialog | No | |
HEROSTABLEAU | unit | Yes | |
InitialFrequencies | integer | Yes | |
integeeer | integer | No | |
iNumCircles | integer | No | 0 |
jugg3 | unit | No | |
jugg4 | unit | No | |
JumpDirection | real | No | |
Jumper | unit | No | |
JumperLandingLoc | location | No | |
JumperLoc | location | No | |
JumpInjurDmg | real | No | |
JumpK | real | No | |
JumpRotate | real | No | |
JumpTheta | real | No | |
JumpX | real | No | |
JumpY | real | No | |
Kills | integer | Yes | |
level | unitcode | Yes | |
MaxMonsters | integer | Yes | |
MiniBoss1 | unit | No | |
MiniBoss2 | unit | No | |
MonsterGroups | group | Yes | |
MonsterSpawners | unit | Yes | |
MoonKey1 | item | No | |
MoonKey2 | item | No | |
MoonKeySFX | effect | No | |
Morts_Vivants_Groupe | group | No | |
NumSpawners | integer | No | |
Paris | integer | No | |
Player1 | unit | No | |
Player1UnitName | string | No | |
Player2 | unit | No | |
Player2UnitName | string | No | |
Player6 | unit | No | |
Player6UnitName | string | No | |
Player7 | unit | No | |
Player7UnitName | string | No | |
Playersgroup | force | No | |
point | location | Yes | |
Position_de_la_cible | location | Yes | |
Position_de_Skwi | location | Yes | |
Pour_la_competence_Champignons | integer | No | |
Pour_la_competence_Creuser | integer | No | |
PV_infestmogg | real | No | |
quete | quest | Yes | |
Salomon_le_saumon | integer | No | |
Sappers1 | group | No | |
Shadow1Timer | timer | No | |
Shadow2Timer | timer | No | |
Shadow3Timer | timer | No | |
Shadow4Timer | timer | No | |
Shadow5Timer | timer | No | |
SpawnTypes | unitcode | Yes | |
SPIDERS | group | No | |
Squelette | unit | No | |
Sunkey | item | No | |
SunKeySFX | effect | No | |
TankSFX | effect | Yes | |
TargetUnit | unit | No | |
Taxes | integer | No | |
TempPlayer1 | unit | No | |
TempPlayer2 | unit | No | |
TempPlayer6 | unit | No | |
TempPlayer7 | unit | No | |
TempSFX | effect | No | |
TheLeaderBoard | leaderboard | No | |
TimerWindow | timerdialog | Yes | |
TrapDamage2 | group | No | |
TXTFLOTTANT | texttag | Yes | |
TXTFLOTTANT_Copier | texttag | No | |
Unitteleported | unit | Yes | |
wavetimer | timer | No |
function Trig_JumpFX_Actions takes nothing returns nothing
local effect JumpFX
call AddSpecialEffectTargetUnitBJ( "origin", udg_Jumper, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
call DestroyEffectBJ(JumpFX)
endfunction
//===========================================================================
function InitTrig_JumpFX takes nothing returns nothing
set gg_trg_JumpFX = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_JumpFX, 0.10 )
call TriggerAddAction( gg_trg_JumpFX, function Trig_JumpFX_Actions )
endfunction