Name | Type | is_array | initial_value |
LEMPP_Ability | abilcode | No | |
LEMPP_BlastDelay | real | Yes | |
LEMPP_BlastRadius | real | Yes | |
LEMPP_CasterUnit | unit | No | |
LEMPP_Damage | real | Yes | |
LEMPP_DamageAT | attacktype | No | |
LEMPP_DamageDT | damagetype | No | |
LEMPP_EfficiencyFactor | real | No | |
LEMPP_Level | integer | No | |
LEMPP_SFXBlast | string | No | |
LEMPP_SFXBlastSizeRatio | real | No | |
LEMPP_SFXOrb | string | No | |
LEMPP_SFXOrbSizeRatio | real | No | |
LEMPP_SFXStun | string | No | |
LEMPP_SFXStunAttach | string | No | |
LEMPP_SizeChange | real | Yes | |
LEMPP_SizeCurrent | real | Yes | |
LEMPP_StunDuration | real | Yes | |
LEMPP_TargetUnit | unit | No | |
LEMPP_TargetValid | boolean | No | |
StunSnippet__AttachPoint | string | No | |
StunSnippet__Duration | real | No | |
StunSnippet__SFX | string | No | |
StunSnippet__StunnedUnit | unit | No | |
StunSnippet_CurrentUnit | unit | No | |
StunSnippet_DEFAULTAttachPoint | string | No | |
StunSnippet_DEFAULTSFX | string | No | |
StunSnippet_OnEventEnd | trigger | No | |
StunSnippet_OnEventLoop | trigger | No | |
StunSnippet_OnEventStart | trigger | No | |
StunSnippet_TEnd | trigger | No | |
StunSnippet_TLoop | trigger | No | |
StunSnippet_TRegister | trigger | No | |
StunSnippet_TStart | trigger | No | |
TELL__AllocDuration | real | No | |
TELL__AllocLoopTimer | real | No | |
TELL__Duration | real | No | |
TELL__Index | integer | No | |
TELL__LoopTimer | real | No | |
TELL_Duration | real | Yes | |
TELL_InitializationFinish | real | No | |
TELL_Instance | integer | No | |
TELL_InstanceIterator | integer | No | |
TELL_Last | integer | No | |
TELL_MaxIndex | integer | No | |
TELL_Next | integer | Yes | |
TELL_OnEventDealloc | trigger | Yes | |
TELL_OnEventLoop | trigger | Yes | |
TELL_OnEventLoopDuration | real | Yes | |
TELL_OnEventLoopTimer | real | Yes | |
TELL_Prev | integer | Yes | |
TELL_RecycleSize | integer | No | |
TELL_RecycleStack | integer | Yes | |
TELL_RegisterID | integer | No | |
TELL_TempID | integer | No | |
TELL_Timer | timer | No | |
TELL_TimerTIMEOUT | real | No | |
TELL_TriggerEmptyEvent | trigger | No | |
TELL_TriggerLoop | trigger | No | |
TELL_TriggerRegister | trigger | No | |
TELLDebugMode | boolean | No | |
TELLDuration | real | No | |
TELLOnEventAlloc | trigger | No | |
TELLOnEventDealloc | trigger | No | |
TELLOnEventLoop | trigger | No | |
TELLOnEventLoopTimer | real | No | |
TempLoc | location | No | |
TempUnit | unit | No | |
TSE__ActiveIndex | integer | No | |
TSE__Point | location | No | |
TSE__RemainingDuration | real | No | |
TSE__SourceUnit | unit | No | |
TSE__SpecialEffect | effect | No | |
TSE__TargetUnit | unit | No | |
TSE_CTimer | timer | No | |
TSE_EmptyEvent | trigger | No | |
TSE_I_ActiveInstance | boolean | Yes | |
TSE_I_ChanneledOrderID | string | Yes | |
TSE_I_Effect | effect | Yes | |
TSE_I_IsChanneling | boolean | Yes | |
TSE_I_LockInstance | boolean | Yes | |
TSE_I_LoopDuration | real | Yes | |
TSE_I_OnEndEvent | trigger | Yes | |
TSE_I_OnLoopEvent | trigger | Yes | |
TSE_I_OnLoopTimer | real | Yes | |
TSE_I_Point | location | Yes | |
TSE_I_RemainingDuration | real | Yes | |
TSE_I_SourceUnit | unit | Yes | |
TSE_I_SourceUnitAliveCheck | boolean | Yes | |
TSE_I_TargetUnit | unit | Yes | |
TSE_I_TargetUnitAliveCheck | boolean | Yes | |
TSE_Index | integer | No | |
TSE_LoopTrigger | trigger | No | |
TSE_MaxCheckOver | boolean | No | |
TSE_MaxIndex | integer | No | |
TSE_MaxRecursion | integer | No | |
TSE_Recursion | integer | No | |
TSE_RegisterTrigger | trigger | No | |
TSE_ReplacementIndex | integer | No | |
TSE_ReplacementIndexFound | boolean | No | |
TSE_TIMEOUT | real | No | |
TSEAttachPoint | string | No | |
TSEChanneledOrderID | string | No | |
TSEDuration | real | No | |
TSEEffectName | string | No | |
TSELL__ActiveIndex | integer | No | |
TSELL__AllocActiveIndex | integer | No | |
TSELL__AllocInteger | integer | No | |
TSELL__AllocLoopTimer | real | No | |
TSELL__AllocPoint | location | No | |
TSELL__AllocRemainingDuration | real | No | |
TSELL__AllocSourceUnit | unit | No | |
TSELL__AllocSpecialEffect | effect | No | |
TSELL__AllocTargetUnit | unit | No | |
TSELL__Integer | integer | No | |
TSELL__LoopTimer | real | No | |
TSELL__Point | location | No | |
TSELL__RemainingDuration | real | No | |
TSELL__SourceUnit | unit | No | |
TSELL__SpecialEffect | effect | No | |
TSELL__TargetUnit | unit | No | |
TSELL_AttachPoint | string | No | |
TSELL_ChanneledOrderID | string | No | |
TSELL_DebugMode | boolean | No | |
TSELL_DestroyEffect | boolean | No | |
TSELL_Duration | real | No | |
TSELL_EffectName | string | No | |
TSELL_EmptyEvent | trigger | No | |
TSELL_FollowUnit | boolean | No | |
TSELL_I_ChanneledOrderID | string | Yes | |
TSELL_I_DestroyEffect | boolean | Yes | |
TSELL_I_FollowUnit | boolean | Yes | |
TSELL_I_Integer | integer | Yes | |
TSELL_I_IsChanneling | boolean | Yes | |
TSELL_I_OnEndEvent | trigger | Yes | |
TSELL_I_OnLoopEvent | trigger | Yes | |
TSELL_I_OnLoopTimer | real | Yes | |
TSELL_I_Point | location | Yes | |
TSELL_I_SourceUnit | unit | Yes | |
TSELL_I_SourceUnitAliveCheck | boolean | Yes | |
TSELL_I_SpecialEffect | effect | Yes | |
TSELL_I_TargetUnit | unit | Yes | |
TSELL_I_TargetUnitAliveCheck | boolean | Yes | |
TSELL_I_TerrainAligned | boolean | Yes | |
TSELL_Index | integer | No | |
TSELL_Integer | integer | No | |
TSELL_MaxIndex | integer | No | |
TSELL_OnEventAllocate | trigger | No | |
TSELL_OnEventDeallocate | trigger | No | |
TSELL_OnEventLoop | trigger | No | |
TSELL_Point | location | No | |
TSELL_Scale | real | No | |
TSELL_SourceUnit | unit | No | |
TSELL_SourceUnitAliveCheck | boolean | No | |
TSELL_TargetUnit | unit | No | |
TSELL_TargetUnitAliveCheck | boolean | No | |
TSELL_TerrainAligned | boolean | No | |
TSELL_TimerForLoop | real | No | |
TSELL_TriggerAllocation | trigger | No | |
TSELL_TriggerDeallocation | trigger | No | |
TSELL_TriggerLoop | trigger | No | |
TSELL_TriggerRegister | trigger | No | |
TSELockInstance | boolean | No | |
TSEOnEndEvent | trigger | No | |
TSEOnIndexEvent | trigger | No | |
TSEOnLoopEvent | trigger | No | |
TSEOnLoopTimer | real | No | |
TSEPoint | location | No | |
TSEScale | real | No | |
TSESourceUnit | unit | No | |
TSESourceUnitAliveCheck | boolean | No | |
TSETargetUnit | unit | No | |
TSETargetUnitAliveCheck | boolean | No | |
TSEUnit | unit | No | |
TSEUnitAliveCheck | boolean | No |
library PauseUnitEx /*
--------------
*/ requires /*
--------------
--------------------
*/ optional Table /*
--------------------
Link: "hiveworkshop.com/forums/showthread.php?t=188084"
--------------------
| PauseUnitEx |
| - MyPad |
--------------------
A simple snippet that grants additional functionality
to BlzPauseUnitEx that mimics PauseUnit
---------
| API |
---------
function PauseUnitEx(unit whichUnit, boolean flag)
- Internally calls BlzPauseUnitEx
function IsUnitPausedEx(unit whichUnit) -> boolean
- Checks if the unit is paused.
- This does not return accurate values when
BlzPauseUnitEx is called directly.
function GetUnitPauseExCounter(unit whichUnit) -> integer
- Returns the pause counter of the unit.
function SetUnitPauseExCounter(unit whichUnit, integer new)
- Sets the pause counter of the unit to the
new value. Internally calls BlzPauseUnitEx
when appropriate.
- Time Complexity: O(n)
*/
private module PauseM
static if LIBRARY_Table then
static Table map = 0
private static method onInit takes nothing returns nothing
set thistype.map = Table.create()
endmethod
else
static hashtable map = InitHashtable()
endif
static method getPauseCounter takes unit whichUnit returns integer
local integer counter = 0
local integer unitId = GetHandleId(whichUnit)
static if LIBRARY_Table then
set counter = map[unitId]
else
set counter = LoadInteger(map, 0, unitId)
endif
return counter
endmethod
static method pauseUnit takes unit whichUnit, boolean flag returns nothing
local integer counter = thistype.getPauseCounter(whichUnit)
local integer unitId = GetHandleId(whichUnit)
local integer incr = IntegerTertiaryOp(flag, 1, -1)
set counter = counter + incr
static if LIBRARY_Table then
set map[unitId] = counter
else
call SaveInteger(map, 0, unitId, counter)
endif
call BlzPauseUnitEx(whichUnit, flag)
endmethod
static method isPaused takes unit whichUnit returns boolean
local integer counter = thistype.getPauseCounter(whichUnit)
return counter > 0
endmethod
static method setPauseCounter takes unit whichUnit, integer new returns nothing
local integer counter = thistype.getPauseCounter(whichUnit)
local integer sign = 0
local integer unitId = GetHandleId(whichUnit)
local boolean flag = false
if new < counter then
set sign = -1
set flag = false
elseif new > counter then
set sign = 1
set flag = true
endif
loop
exitwhen counter == new
set counter = counter + sign
call BlzPauseUnitEx(whichUnit, flag)
endloop
static if LIBRARY_Table then
set map[unitId] = counter
else
call SaveInteger(map, 0, unitId, counter)
endif
endmethod
endmodule
private struct Pause extends array
implement PauseM
endstruct
function PauseUnitEx takes unit whichUnit, boolean flag returns nothing
call Pause.pauseUnit(whichUnit, flag)
endfunction
function SetUnitPauseExCounter takes unit whichUnit, integer new returns nothing
call Pause.setPauseCounter(whichUnit, new)
endfunction
function IsUnitPausedEx takes unit whichUnit returns boolean
return Pause.isPaused(whichUnit)
endfunction
function GetUnitPauseExCounter takes unit whichUnit returns integer
return Pause.getPauseCounter(whichUnit)
endfunction
endlibrary
library RemoveEffect
//Destroying an effect always plays its death animation and any associated sounds.
//This library fixes it in a simple way: move the effect to a location where nobody can see or hear it.
//By Pyrogasm, additional help by Bribe
//v1.1
globals
private real SAFE_X = -3900.
private real SAFE_Y = 3900.
private real SAFE_Z = -1000.
private real TIMESCALE = 10. //doesn't really matter what this is but we set it to > 0 so the animations actually finish
endglobals
function RemoveEffect takes effect e returns nothing
call BlzSetSpecialEffectAlpha(e, 255)
call BlzSetSpecialEffectZ(e, SAFE_Z)
call BlzSetSpecialEffectPosition(e, SAFE_X, SAFE_Y, SAFE_Z)
call BlzSetSpecialEffectTimeScale(e, TIMESCALE)
call DestroyEffect(e)
endfunction
endlibrary
library GetLocZ
globals
private location moveableLoc = Location(0, 0)
endglobals
function GetLocZ takes real x, real y returns real
call MoveLocation(moveableLoc, x, y)
return GetLocationZ(moveableLoc)
endfunction
endlibrary
library AddSpecialEffectTerrainAligned requires GetLocZ
function AddSpecialEffectTerrainAligned takes string effectPath, real x, real y, real yaw returns effect
local effect newEffect = AddSpecialEffect(effectPath, x, y)
local real dzdx = (GetLocZ(x + 1, y) - GetLocZ(x - 1, y))/2
local real dzdy = (GetLocZ(x, y + 1) - GetLocZ(x, y - 1))/2
local real nx = -dzdx
local real ny = -dzdy
local real totalAngle = Acos(1/SquareRoot(nx*nx + ny*ny + 1))
local real phiNormal = Atan2(ny, nx)
local real pitch = totalAngle*Cos(yaw - phiNormal)
local real roll = totalAngle*Sin(yaw - phiNormal)
call BlzSetSpecialEffectOrientation(newEffect, yaw, pitch, roll)
return newEffect
endfunction
function TerrainAlignEffect takes effect whichEffect returns nothing
local real x = BlzGetLocalSpecialEffectX(whichEffect)
local real y = BlzGetLocalSpecialEffectY(whichEffect)
local real dzdx = (GetLocZ(x + 1, y) - GetLocZ(x - 1, y))/2
local real dzdy = (GetLocZ(x, y + 1) - GetLocZ(x, y - 1))/2
local real nx = -dzdx
local real ny = -dzdy
local real totalAngle = Acos(1/SquareRoot(nx*nx + ny*ny + 1))
local real phiNormal = Atan2(ny, nx)
local real pitch = totalAngle*Cos(-phiNormal)
local real roll = totalAngle*Sin(-phiNormal)
call BlzSetSpecialEffectOrientation(whichEffect, 0, pitch, roll)
endfunction
endlibrary
//Place these functions at map header (Jass) or in a library/module (vJass)
library TimedEffect
function CreateTimedEffectOnUnit takes string mdl, unit target, string attach, real duration returns nothing
set udg_TSELL_EffectName = mdl
set udg_TSELL_TargetUnit = target
set udg_TSELL_AttachPoint = attach
set udg_TSELL_Duration = duration
call ConditionalTriggerExecute( udg_TSELL_TriggerRegister )
endfunction
function CreateTimedEffectOnLoc takes string mdl, real x, real y, real duration returns nothing
set udg_TSELL_EffectName = mdl
set udg_TSELL_Point = Location(x,y)
set udg_TSELL_Duration = duration
call ConditionalTriggerExecute( udg_TSELL_TriggerRegister )
endfunction
endlibrary