Name | Type | is_array | initial_value |
allocatedAttacks | integer | No | |
allocCounter | integer | No | |
amount | real | No | |
Arrow_Angle | real | No | |
Arrow_Caster | unit | Yes | |
Arrow_CasterLoc | location | No | |
Arrow_CountMaxSize | integer | No | |
Arrow_Counts | integer | No | |
Arrow_CusValue | integer | No | |
Arrow_Distance | real | Yes | |
Arrow_DistanceCount | real | Yes | |
Arrow_DistanceTravel | real | Yes | |
Arrow_DummyLoc | location | No | |
Arrow_Movement | location | No | |
Arrow_RandomUnit | group | No | |
Arrow_StartGroup | group | No | |
Arrow_StunDuration | integer | Yes | |
Arrow_TargetPoint | location | No | |
Arrow_UnitGroup | group | No | |
ATTACK_TYPE_UNIVERSAL | attacktype | No | |
AttackedBuff | abilcode | Yes | |
BotLifes | integer | No | |
BotScore | integer | No | |
BRACERS_SPELL_DAMAGE_REDUCTION | real | No | |
CapturetheFlag | boolean | No | |
Carrier | unit | No | |
CarrierCircle | unit | No | |
CarrierIN | timer | No | |
CarrierINWINDOW | timerdialog | No | |
CarrierMultiboard | multiboard | No | |
CarrierScore | integer | Yes | |
CarrierScoreToWin | integer | No | |
CarrierSFX | effect | No | |
ChooseGameLifes | dialog | No | |
ChooseGameMode | dialog | No | |
ChooseGameScore | dialog | No | |
CircleFlag | unit | Yes | |
CItemType | itemcode | Yes | |
CODE | integer | No | |
CTFMultiboard | multiboard | No | |
CTFtimerwindow | timerdialog | No | |
CTFtimrstarts | timer | No | |
CurceUnit | unit | No | |
DAMAGE_TYPE_DETECTOR | integer | No | |
damageEvent | trigger | No | |
damageEventTrigger | real | No | |
damageHandler | trigger | No | |
damageType | integer | No | |
Deathmatch | boolean | No | |
DeathmatchMultiboard | multiboard | No | |
DialogCapturetheFlag | button | No | |
DialogDeathmatch | button | No | |
DialogKillTheCarrier | button | No | |
DialogLifes | button | Yes | |
DialogScore | button | Yes | |
DialogTime | button | Yes | |
ETHEREAL_DAMAGE_FACTOR | real | No | |
Flag | item | Yes | |
FlagCarrierBuff | effect | Yes | |
FlagCarrierHuman | unit | No | |
FlagCarrierOrc | unit | No | |
h | hashtable | No | |
JD_Angle | real | Yes | |
JD_Counter | real | Yes | |
JD_Distances | real | Yes | |
JD_Effect | string | Yes | |
JD_Group | group | No | |
JD_Integers | integer | Yes | |
JD_LevelOfAbility | integer | Yes | |
JD_PickGroup | group | No | |
JD_ReachedDistance | real | Yes | |
JD_SpeedUnits | real | Yes | |
JD_TempPoint | location | Yes | |
JD_TreesDestroy | boolean | Yes | |
JD_Unit | unit | Yes | |
JDA_DestroyTrees_Dash | boolean | No | |
JDA_LevelOfAbility | integer | No | |
JDA_SpecialEffect | string | No | |
JDA_Speed | real | No | |
JDA_TargetPoint | location | No | |
JDA_Unit | unit | No | |
KB_Angle | real | Yes | |
KB_Casters | unit | Yes | |
KB_CountBuffs | integer | No | |
KB_DestroyTrees | boolean | Yes | |
KB_EffectCounter | integer | Yes | |
KB_EffectCounter2 | integer | Yes | |
KB_Effects_1 | string | Yes | |
KB_Effects_2 | string | Yes | |
KB_GeneralIntegers | integervar | Yes | |
KB_KnockbackedUnits | group | No | |
KB_Levels | integer | Yes | |
KB_MaxDistance | real | Yes | |
KB_ReachedDistance | real | Yes | |
KB_ReducedReal | real | No | |
KB_ReduceSpeedReal | real | Yes | |
KB_SpecificSpeed | real | Yes | |
KB_StartPositions | location | Yes | |
KB_TempPoint | location | Yes | |
KB_TempReal | real | No | |
KB_TotalKnockUnits | integer | No | |
KB_Units | unit | Yes | |
KBA_Caster | unit | No | |
KBA_DestroyTrees | boolean | No | |
KBA_DistancePerLevel | real | No | |
KBA_Level | integer | No | |
KBA_SpecialEffects | string | Yes | |
KBA_Speed | real | No | |
KBA_StartingPosition | location | No | |
KBA_TargetUnit | unit | No | |
Livespergame | integer | No | |
LoopingInteger | integervar | No | |
LostSoul | unit | Yes | |
Mage_Hash | hashtable | No | |
MainColor | string | Yes | |
P_Angle | real | No | |
P_Caster | unit | No | |
P_Distance | real | No | |
P_Group | group | No | |
P_Handle | integer | No | |
P_Level | integer | No | |
P_Loops | integer | No | |
P_Manaend | real | No | |
P_Manastart | real | No | |
P_Manatotal | real | No | |
P_Point1 | location | No | |
P_Point2 | location | No | |
P_Slidedistance | real | No | |
P_Timer | real | No | |
P_Unit | unit | No | |
PHYSICAL | integer | No | |
PlayerAttacked | player | Yes | |
PlayerAttackedUnit | unit | Yes | |
PlayerAttacker | player | Yes | |
PlayerAttackerUnit | unit | Yes | |
PlayerColors | string | Yes | |
PlayerHero | unit | Yes | |
pureAmount | real | No | |
RevivalTime | integer | No | |
runAllocatedAttacks | trigger | No | |
SafeZoneGroup | group | No | |
ScoreToWin | integer | No | |
SET_MAX_LIFE | integer | No | |
Shockwave_Angle | real | No | |
Shockwave_Group | group | Yes | |
Shockwave_Point | location | Yes | |
source | unit | No | |
SPELL | integer | No | |
SPELL_DAMAGE_REDUCTION_ITEM | integer | No | |
SPELL_RESISTANCE_AUTO_DETECT | boolean | No | |
SR_DeadGroup | group | No | |
SR_Hashtable | hashtable | No | |
SR_Interval | real | No | |
SR_Key | integer | No | |
SR_MaxSpawnUnitType | integer | No | |
SR_PlayerColor | string | Yes | |
SR_RespawnDuration | real | Yes | |
SR_SpawnLimit | integer | Yes | |
SR_SpawnRegion | rect | Yes | |
SR_SpawnUnit | unitcode | Yes | |
target | unit | No | |
Team1NameGen | integer | No | |
Team2NameGen | integer | No | |
TeamName | string | Yes | |
TempLoc | location | No | |
TempUnit | unit | No | |
TopLifes | integer | No | |
TopScore | integer | No | |
totalAllocs | integer | No | |
TPSFX | effect | Yes | |
TRdummyh | unit | No | |
TRhash | hashtable | No | |
TRIGGER_CLEANUP_PERIOD | real | No | |
TRindexD | integer | No | |
TRindexN | integer | No | |
TRisEnabled | boolean | No | |
TRtimers | timer | Yes | |
TRtrig | trigger | No | |
UNIT_MIN_LIFE | real | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
//************************************************************************************************
//* ____ ___ ___ *
//* /_ _| _ \/ __/ Tree Revival System *
//* | || /\__ \ by Spinnaker *
//* |_||_|\_\___/ v1.2.3.1 *
//* *
//************************************************************************************************
//*********************************************************
//* Globals required
//*********************************************************
//* udg_TRtrig Trigger for handling the revive actions
//* udg_TRhash Hashtable for timer issues
//* udg_TRindexD Stores revival instances
//* udg_TRindexN Parameter for timers manipulation
//* udg_TRtimers Timer array variable for recycle issues
//* udg_TRdummyh Dummy harvester for IsDestructibleTree function
//* udg_TRisEnabled Boolean parameter for enabling/disabling the system
//*********************************************************
//* Important
//*********************************************************
// Note: Units which step on position of tree which is currently
// being resurrected may get stuck between trees in that area
//*********************************************************
//* Constant configurable functions
//*********************************************************
//* Rawdata of undead locust unit type
constant function TR_dummyhId takes nothing returns integer
return 'uloc'
endfunction
//* Rawdata of dummy ghoul harvest ability
constant function TR_harvestId takes nothing returns integer
return 'Ahrl'
endfunction
//* Harvest order ID
constant function TR_orderId takes nothing returns integer
return 852018
endfunction
//* Delay before tree gets resurrected
constant function TR_ReviveDelay takes nothing returns real
return 25.
endfunction
//* Tells if birth animation should be shown while resurrecting a tree
constant function TR_ShowAnimation takes nothing returns boolean
return true
endfunction
//*********************************************************
//* System itself
//*********************************************************
function TR_recycleTimer takes timer t returns nothing
debug if t == null then
debug call BJDebugMsg("Attempt to release a null timer")
else
call PauseTimer(t)
set udg_TRtimers[udg_TRindexN] = t
set udg_TRindexN = udg_TRindexN + 1
endif
endfunction
function TR_getTimer takes nothing returns timer
if 0 == udg_TRindexN then
return CreateTimer()
endif
set udg_TRindexN = udg_TRindexN - 1
return udg_TRtimers[udg_TRindexN]
endfunction
function TR_Callback takes nothing returns nothing
local destructable d = LoadDestructableHandle(udg_TRhash, 0, GetHandleId(GetExpiredTimer()))
call DestructableRestoreLife(d, GetDestructableMaxLife(d), TR_ShowAnimation())
call TR_recycleTimer(GetExpiredTimer())
set udg_TRindexD = udg_TRindexD - 1
if udg_TRindexD == 0 then
call FlushChildHashtable(udg_TRhash, 0)
endif
set d = null
endfunction
function TR_CallRevive takes nothing returns boolean
local timer t
if udg_TRisEnabled then
set t = TR_getTimer()
set udg_TRindexD = udg_TRindexD + 1
call SaveDestructableHandle(udg_TRhash, 0, GetHandleId(t), GetTriggerDestructable())
call TimerStart(t, TR_ReviveDelay(), false, function TR_Callback)
set t = null
endif
return false
endfunction
function TR_IsDestructableTree takes destructable dest returns boolean
return IssueTargetOrderById(udg_TRdummyh, TR_orderId(), dest)
endfunction
function TR_AddTree takes nothing returns nothing
if TR_IsDestructableTree(GetEnumDestructable()) then
call TriggerRegisterDeathEvent(udg_TRtrig, GetEnumDestructable())
endif
endfunction
//***************************************************************************
function InitTrig_TreeRevival takes nothing returns nothing
set udg_TRtrig = CreateTrigger()
set udg_TRhash = InitHashtable()
//* By default enabled
set udg_TRisEnabled = true
//* Actions required for IsDestructibleTree function
set udg_TRdummyh = CreateUnit(Player(15), TR_dummyhId(), 0., 0., 0.)
call ShowUnit(udg_TRdummyh, false)
call UnitAddAbility(udg_TRdummyh, TR_harvestId())
call UnitRemoveAbility(udg_TRdummyh, 'Amov')
//* Revival setup
call EnumDestructablesInRect(bj_mapInitialPlayableArea, null, function TR_AddTree)
call TriggerAddCondition(udg_TRtrig, Condition(function TR_CallRevive))
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
This is the Advanced Shockwave Spell by Paladon.
I´ll try to comment my triggering as far as i´m able to.
You may need triggering basics to understand what i´m doing exactly,
but i´m sure that this documentation will be helpful to those who want to
learn some advanced features of GUI triggering.
Thanks for testing this spell.
Paladon
PS:
This spell is created due to a request and uses my Knockback System.
If you need further informations and examples about this system, please search for it in the spell section of //www.hiveworkshop.com
Changelog:
Added the Knockback System readmes and fixed a minor flaw concerning the balance of the spell.
I additionally added some more detailed comments at several places since someone asked me to do so.
I´d be glad if you credit me if you´re using this spell, or the systems it uses, in your very own map.