Name | Type | is_array | initial_value |
CloudSFX | effect | No | |
FullCheck | boolean | 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 | |
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 |
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
function Trig_Untitled_Trigger_003_Actions takes nothing returns nothing
call BlzSetSpecialEffectHeight( GetLastCreatedEffectBJ(), 200.00 )
call BlzSetSpecialEffectZ( GetLastCreatedEffectBJ(), 0.0 )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_003 takes nothing returns nothing
set gg_trg_Untitled_Trigger_003 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_003, function Trig_Untitled_Trigger_003_Actions )
endfunction