Name | Type | is_array | initial_value |
AfterDamageEvent | real | No | |
Beam_CannotHitMagicImmune | boolean | Yes | |
Beam_Damage | real | Yes | |
Beam_DamageStack | real | Yes | |
Beam_group1 | group | No | |
Beam_group2 | group | No | |
Beam_group3 | group | No | |
Beam_group4 | group | No | |
Beam_group5 | group | No | |
Beam_group6 | group | No | |
Beam_group7 | group | No | |
Beam_HitStack | integer | Yes | |
Beam_ImpactOffset | integer | No | |
Beam_Interval | integer | Yes | |
Beam_IntervalDMG | integer | Yes | |
Beam_IntervalDMGTrigger | integer | Yes | |
Beam_IntervalDPS | integer | Yes | |
Beam_IntervalFX | integer | Yes | |
Beam_IsABeamer | boolean | Yes | |
Beam_IsChargingDone | boolean | Yes | |
Beam_IsFollowing | boolean | Yes | |
Beam_LastDamage | real | Yes | |
Beam_LastOrder | ordercode | Yes | |
Beam_MainGroup | group | No | |
Beam_OrderWidget | unit | Yes | |
Beam_ReacquireTarget | boolean | Yes | |
Beam_RestoreLastOrder | boolean | Yes | |
Beam_TerminateBeam | boolean | Yes | |
Beam_X | real | Yes | |
Beam_X_Moved | real | Yes | |
Beam_Y | real | Yes | |
Beam_Y_Moved | real | Yes | |
BeamCaster | unit | Yes | |
BeamConfig_AbilityCasterFX | abilcode | Yes | |
BeamConfig_AbilityMoverFX | abilcode | Yes | |
BeamConfig_APLHA | real | Yes | |
BeamConfig_AttackType | attacktype | Yes | |
BeamConfig_AuxiliaryTurret | unit | Yes | |
BeamConfig_BeamType | string | Yes | |
BeamConfig_BLUE | real | Yes | |
BeamConfig_CasterAngle | real | Yes | |
BeamConfig_CasterHeight | real | Yes | |
BeamConfig_CasterOffset | real | Yes | |
BeamConfig_CasterPeriodicFX | string | Yes | |
BeamConfig_CasterScale | real | Yes | |
BeamConfig_ChargeLimit | integer | Yes | |
BeamConfig_ChargeUpFX | string | Yes | |
BeamConfig_DamageAOE | real | Yes | |
BeamConfig_DamageFactor | real | Yes | |
BeamConfig_DamageType | integer | Yes | |
BeamConfig_DummyString | string | Yes | |
BeamConfig_DummyType | unitcode | Yes | |
BeamConfig_FollowRange | real | Yes | |
BeamConfig_GREEN | real | Yes | |
BeamConfig_HitAll | boolean | Yes | |
BeamConfig_HitsPerSecond | integer | Yes | |
BeamConfig_ImpactPeriodicFX | string | Yes | |
BeamConfig_IntervalFXLimit | integer | Yes | |
BeamConfig_IsImmobilised | boolean | Yes | |
BeamConfig_IsMoverGrounded | boolean | Yes | |
BeamConfig_MoverScale | real | Yes | |
BeamConfig_Range | real | Yes | |
BeamConfig_RED | real | Yes | |
BeamConfig_SweepAOE | real | Yes | |
BeamConfig_SweepSpeed | real | Yes | |
Beamer | unit | No | |
BeamerPick | unit | No | |
BeamerPick_cancel | unit | No | |
BeamEvent | real | No | |
BeamEvent_Caster | unit | No | |
BeamEvent_Damage | real | No | |
BeamEvent_Lightning | lightning | No | |
BeamEvent_Mover | unit | No | |
BeamEvent_Source | unit | No | |
BeamEvent_Target | unit | No | |
BeamEvent_Target_OLD | unit | No | |
BeamID | integer | No | |
BeamIDAbility | integer | No | |
BeamLightning | lightning | Yes | |
BeamMover | unit | Yes | |
BeamOwner | player | Yes | |
BeamSource | unit | Yes | |
BeamStop | boolean | Yes | |
BeamTarget | unit | Yes | |
ClearDamageEvent | trigger | No | |
DamageBlockingAbility | abilcode | No | |
DamageEvent | real | No | |
DamageEventAmount | real | No | |
DamageEventOverride | boolean | No | |
DamageEventPrevAmt | real | No | |
DamageEventSource | unit | No | |
DamageEventsWasted | integer | No | |
DamageEventTarget | unit | No | |
DamageEventTrigger | trigger | No | |
DamageEventType | integer | No | |
DamageModifierEvent | real | No | |
DamageTypeBeam | integer | No | |
DamageTypeBlocked | integer | No | |
DamageTypeCriticalStrike | integer | No | |
DamageTypeExplosive | integer | No | |
DamageTypeHeal | integer | No | |
DamageTypeHPDrain | integer | No | |
DamageTypeReduced | integer | No | |
DmgEvLife | real | No | |
DmgEvPrevLife | real | No | |
DmgEvRecursionLevel | integer | No | |
DmgEvRecursionN | integer | No | |
DmgEvRunning | boolean | No | |
DmgEvStarted | boolean | No | |
DmgEvTimer | timer | No | |
DmgEvTrig | trigger | No | |
DmgEvUnit | unit | No | |
DoNotClearNext | boolean | No | |
GUCS_Hash | hashtable | No | |
GUCS_Size | integer | No | |
GUCS_U | unit | No | |
IsDamageSpell | boolean | No | |
LastDamageHP | real | No | |
LastDmgPrevAmount | real | Yes | |
LastDmgPrevType | integer | Yes | |
LastDmgSource | unit | Yes | |
LastDmgTarget | unit | Yes | |
LastDmgValue | real | Yes | |
LastDmgWasSpell | boolean | Yes | |
NextDamageOverride | boolean | No | |
NextDamageType | integer | No | |
SpellDamageAbility | abilcode | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitDamageRegistered | boolean | Yes | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
UnitIndexLock | integer | Yes | |
VR_CurrentLevel | integer | Yes | |
VR_DowngradeThreshold | integer | Yes | |
VR_ID | integer | No | |
VR_Interval | integer | Yes | |
VR_IsAVoidRay | boolean | Yes | |
VR_LevelString | string | Yes | |
VR_Loop | integer | No | |
VR_MainGroup | group | No | |
VR_MaxLevel | integer | Yes | |
VR_PercentageBonusPerLevel | real | Yes | |
VR_TempDamage | real | No | |
VR_TempGroup | group | No | |
VR_Tier0 | string | Yes | |
VR_Tier1 | string | Yes | |
VR_Tier10 | string | Yes | |
VR_Tier2 | string | Yes | |
VR_Tier3 | string | Yes | |
VR_Tier4 | string | Yes | |
VR_Tier5 | string | Yes | |
VR_Tier6 | string | Yes | |
VR_Tier7 | string | Yes | |
VR_Tier8 | string | Yes | |
VR_Tier9 | string | Yes | |
VR_UpgradeThreshold | integer | Yes |
//TESH.scrollpos=0
//TESH.alwaysfold=0
PERSISTENT BEAM v3.1 by Spellbound
Persistent Beam will attempt to mimic how beams work in Starcraft 2. Any unit configured to use Persistent Beam will fire a constant stream of energy at its
target, dealing damage X times per second. The beam can be configured to lock onto the target, or follow the target around at a set speed, dealing area of
effect damage, like the Colossus in Starcraft 2 Alpha.
REQUIREMENTS:
Unit Indexer by Bribe http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/
Damage Engine by Bribe http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-5-4-1-a-201016/
GetUnitCollisionSize by Almia http://www.hiveworkshop.com/forums/spells-569/getunitcollisionsize-gui-v1-4-a-225448/
HOW TO IMPORT:
* import the dummy.mdx model (credits to Vexorian) to your map.
* import the dummy unit from the object editor to your map.
* Make sure that in File > Preferences > General, the box next to 'Automatically create unknown variables while pasting trigger data' is ticked.
* Copy Unit Indexer to your map.
* Copy Damage Engine to your map. Go to the Object Editor and copy the abilities 'Cheat Death Ability (+500,000)' and 'Detect Spell Damage' to your map.
* Set those abilities to the proper variabls in Damage Engine. Eg: Set DamageBlockingAbility = Cheat Death Ability (+500,000)
Set SpellDamageAbility = Detect Spell Damage
* If you were already using Damage Engine, or obtained it via the link above, add Set DamageTypeBeam = 5 to Damage Engine list of damage types.
The value of DamageTypeBeam may be changed to any number if 5 is already in use. //DamageTypeHPDrain is optional. Demo purposes.
* Copy GetUnitCollisionSize to your map.
* Copy the Variable Creator to your map.
* Copy the Persistent Beam folder to your map.
* Setup your units inside (see HOW TO GIVE UNITS PERSISTENT BEAM).
* Go to Persistent Beam Ability Exceptions and add whatever abilities you want to the list that you want to not interrupt beams.
* You are done!
PS: I am using custom lightning effects in this map. Feel free to import them if your want, but keep in mind this is not the complete list.
Credits to WILL THE ALMIGHTY for the green laser special effect.
HOW TO GIVE UNITS PERSISTENT BEAM:
* In the Object Edtitor, change Projectile Speed to 10000 and Projectile Art to none.
* The system averages a dps depending on your the Cooldown Time of the unit, so you can set that to whatever avlue you desire.
However, a long Cooldown Time will delay when the charge-up begins, so avoid setting it higher than 1 second. 0.25 or 0.5 are good compromises, but calculate your dps accordingly.
* 'In Persistent Beam Setup' copy/paste one of the if/then/else blocks and configure it with your unit.
* Refer to the variables below for an explanation of what they do.
VARIABLES:
BeamConfig_BeamType[UDex] // the lightning effect
BeamConfig_RED[UDex] //For Lightning Effect colour. Use 0.00 - 1.00 as value. Eg: 0.50 is 50%.
BeamConfig_GREEN[UDex] //For Lightning Effect colour. Use 0.00 - 1.00 as value. Eg: 0.50 is 50%.
BeamConfig_BLUE[UDex] //For Lightning Effect colour. Use 0.00 - 1.00 as value. Eg: 0.50 is 50%.
BeamConfig_ALPHA[UDex] //For Lightning Effect TRANSPARENCY. Use 0.00 - 1.00 as value. 0.00 is completely invisible. 1.00 is maximum opacity (fully visible).
BeamConfig_AbilityCasterFX[UDex] // ability variable. I use this to add special effects so that you mastack multiple effects.
BeamConfig_AbilityTargetFX[UDex] // same as above. This one is onto the move.
BeamConfig_ImpactPeriodicFX[UDex] // use this to create recurring effects on the mover. The mover is locked onto the target.
BeamConfig_CasterPeriodicFX[UDex] // use this to create recurring effects on the caster. The caster is locked onto the attacker and can be offset to match with the attacker's weapon position.
BeamConfig_ChargeUpFX[UDex] // FX for charging up. Use special effects that animate on death, like a missile. Same for the above two.
BeamConfig_AttackType[UDex] = Magic // sets the attack type of the attacker. This is required for AoE damage, since different units have different armour types.
BeamConfig_DamageType[UDex] = DamageTypeBeam // The damage type that Damage Engine will deal. This is useful if you want something different, like a life drain. See Gargoyle.
BeamConfig_HitsPerSecond[UDex] // This is hoe many times you want the beam to strike in 1 second. A value of 3 is default. This does not alter damage.
BeamConfig_IntervalFXLimit[UDex] = 4 //This sets how frequently the charge/impact/caster effects will happen. Lower than 3 may drop your framerate if you have too many Beamers attacking at once.
BeamConfig_CasterScale[UDex] = 100.00 // scale of the caster dummy unit. A value of 100 is 100%.
BeamConfig_MoverScale[UDex] = 140.00 // scale of the mover dummy unit.
BeamConfig_ChargeLimit[UDex] = 66 // timer clicks ever 0.03 seconds, so 33 intervals is 0.99 seconds, aka 1 seconds for simplicity's sake. 66 intervals = 2 seconds.
BeamConfig_CasterOffset[UDex] = 0.00 // by how much to offset the caster so that it's aligned with the attacker's weapon. Set to 0 to disregard.
BeamConfig_CasterAngle[UDex] = 0.00 // by how many degrees to angle the caster if CasterOffset is more than 0.00. Use this to position the caster with a unit's weapon or hand.
BeamConfig_CasterHeight[UDex] = 260.00 // changing height of casting to fit with attacker's model/weapon/etc.
BeamConfig_Range[UDex] = 800.00 // attack range of the attacker. If target goes beyond that, the beam is destroyed. Avoid setting that to a different value than your unit's attack range.
BeamConfig_SweepSpeed[UDexD] = 300.00 // speed at which the beam follows the target. If the value is 0, the beam will lock on to the target.
BeamConfig_DamageAOE[UDex] = 100.00 // the AoE around the mover that will pick units to damage. If the value is 0 the damage will apply ONLY to the target.
BeamConfig_SweepAOE[UDex] = 600.00 // the scan range for when the mover reacquires new targets. If new targets are outside that scan range, the beam resets.
BeamConfig_FollowRange[UDex] = 400.00 // the range at which a beamer will follow another unit.
BeamConfig_IsImmobilised[UDex] // if this is TRUE, then Beamer will have to stay stationary to fire. If FALSE, the Beamer may move around while firing. Use Stop command to end beam.
BeamConfig_IsMoverGrounded[UDex] = True // if this is TRUE, the mover will be constrained to the ground. Refer to the Shade's attack to see how this can be useful.
BeamConfig_HitAlt[UDex] = True // if this is TRUE, then your beam will hit ground and air units simultaneously. Make sure your unit can also target both in the object editor.
BeamConfig_AuxillaryTurret[UDex] // if you have a moving turret, set this to a unit so the beam fires from it. Leave at No Unit until your turret is created. Refer to the Owl Scout config.
BeamConfig_DummyType[UDex] = Dummy Unit (0 Collision) // this is necessary for the code to work, but also comes with the advantage of allowing you to have dummies with different collision,
// allowing you to center it correctly on a model that is off-center, with a collision of 16 on your dummy rather than 0.
NB:
set udg_Beam_IsABeamer[udg_UDex] = true // make sure you have this in your if/then/else config block and ensure it's always set to TRUE or else the beams won't fire.
BEAM EVENTS
Since v2.8, Persistent Beam has events that you may use to catch when beams begin charge-up, every charge-up interval, charge-up end/beam creation,
beam interval, beam retargeting, & beam end.
Game - BeamEvent becomes Equal to 1.00 // Fires when the Beam begins chargeup
Game - BeamEvent becomes Equal to 1.50 // Fires every 0.03 seconds of chargeup time.
Game - BeamEvent becomes Equal to 2.00 // Fires when chargeup completes and the beam is created.
Game - BeamEvent becomes Equal to 2.50 // Fires every 0.03 seconds of beam time, after chargeup is complete
Game - BeamEvent becomes Equal to 3.00 // Fires when target is reacquired automatically.
Game - BeamEvent becomes Equal to 4.00 // Fires when Beam is terminated.
Here are the variables that you can use with those events. Those are mostly for reference. If you wish to alter an actual value, use the BeamConfig ones.
BeamEvent_Source // this is the Beamer.
BeamEvent_Target // this is the target your beam follows or is lock-on to.
BeamEvent_Caster // this is the dummy unit that projects the beam.
BeamEvent_Mover // this is the dummy unit that recieves the beam and moves it around. If beam is locked-on, the position of BeamMover will not be the same as BeamTarget.
BeamEvent_Damage // this is the average dps of your Beamer, averaged over 3 seconds.
BeamEvent_Target_OLD// this is the target before target was switch. IT IS ONLY AVAILABLE WHEN BeamEvent is equal to 3.00
BeamEvent_Lightning // this is the lightning effect itself. You can use this to change it's colour if you so desire. To swap if for something else, destroy (cont.)
// destroy the lightning, null it, and then recreate the beam and set it to BeamLightning[Custom Value of Beamer]. Be sure to check whether a lightning
// effect exists before you destroy it. For example, the Shade does not use a lightning effect. Use the following if/then/else block for safety:
if udg_BeamLightning[udg_BeamID] != null then
Destroy lightning
Null lightning
Recreate lightning
Set BeamLightning[Custom Value of Beamer] = Last Created Lightning Effect
endif
// BeamEvent_Lightning is NOT available when BeamEvent is equal to 1.00 or 1.50 as the lightning has not yet been created.
//TESH.scrollpos=0
//TESH.alwaysfold=0
VOID RAY v1.4 by Spellbound
This emulates the Void Ray from Starcraft 2. Evert tier increases after 3 seconds up to 2 times, and each time the beam will change and the damage will increase as well.
After the beam has terminated, the beam will downgrade 1 tier after 5 seconds.
REQUIREMENTS:
Persistent Beam v3.2 http://www.hiveworkshop.com/forums/spells-569/persistent-beam-v3-2-a-270222/
- GUI Unit Indexer v1.2.0.2 http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/
- Damage Engine v3.5.4.1 http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-5-4-1-a-201016/
- GetUnitCollisionSize for GUI v1.4 http://www.hiveworkshop.com/forums/spells-569/getunitcollisionsize-gui-v1-4-a-225448/
HOW TO IMPORT:
If you do not have Peristent Beam already.
* import the dummy.mdx model (credits to Vexorian) to your map.
* import the dummy unit from the object editor to your map.
* Make sure that in File > Preferences > General, the box next to 'Automatically create unknown variables while pasting trigger data' is ticked.
* Copy the Requirements folder to your map.
* Copy the PB Variable Creator trigger in the Persistent Beam folder to your map. Feel free to delete it afterwards.
* Copy the Persistent Beam folder to your map. Refer to PB README if you need explanations on how to setup your units.
Start here if you already have Peristent Beam in your map:
* Copy Variable Creator in the Void Ray folder to your map.
* Copy the Void Ray folder to your map.
* Add any units to the Void Ray Setup trigger.
VARIABLES:
VR_IsAVoidRay[UDex] = true // Set this to true always or else the triggers won't be able to identify the unit.
VR_MaxLevel[UDex] = 0 // This is number of times the beam can upgraded. Tier 0 is the beam's default state.
VR_UpgradeThreshold[UDex] = 0 // this is how many intervals must happen until the beam upgrades one level. A value of 33 is 1 second.
VR_DowngradeThreshold[UDex] = 0 // this is how many intervals must happen until the beam lowers one level. A value of 33 is 1 second.
VR_PercentageBonusPerLevel[UDex] = 1.00 // this is by how much the damage increases per tier. 1.00 is 100%. 1.60 is 160%, etc...
VR_LevelString[UDex] = "" // this is your default lightning effect string, like CLPB for Chain Lightning - Primary Beam. You don't have to setup
// lightning effects for all levels. If you have them for 3 levels, but your VR_MaxLevel[UDex] is 5, it will use the
// last lightning effect as the one for the rest of the levels.
***
VR_CurrentLevel[UDex] = 1 // DO NOT CHANGE THIS. This sets the default level to 1, which is the lowest.
This system uses 2D arrays, and as such you will need to go inside the array itself to add more levels.
Example: Set VR_LevelString[((UDex x VR_MaxLevel[UDex]) + 3)] = CLPB // If you want to add more levels, simply copy/paste this line (in the Setup trigger),
// go inside the trigger and chaneg +3 to +4. Keep increasing the valye and changing
// the string name to the desired lightning effect and the system should handle the
// switch between lightning effects as the levels increase and decrease. Make sure to
// set VR_MaxLevel[UDex] to number of upgrades + 1. Eg, the demo Sphinx's beam will upgrade
// twice, and so it's VR_MaxLevel[UDex] is 3.
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Void_Ray_Stop_Actions takes nothing returns nothing
local unit u = null
local integer ID = 0
local string beam = ""
local boolean array b
loop
set u = FirstOfGroup(udg_VR_MainGroup)
exitwhen u == null
call GroupRemoveUnit(udg_VR_MainGroup, u)
call GroupAddUnit(udg_VR_TempGroup, u)
set ID = GetUnitUserData(u)
set udg_VR_Interval[ID] = udg_VR_Interval[ID] + 1
if udg_VR_Interval[ID] >= udg_VR_DowngradeThreshold[ID] then
set udg_VR_Interval[ID] = 0
set udg_VR_CurrentLevel[ID] = udg_VR_CurrentLevel[ID] - 1
set beam = udg_VR_LevelString[(ID * udg_VR_MaxLevel[ID]) + udg_VR_CurrentLevel[ID]]
if beam != null then
set udg_BeamConfig_BeamType[ID] = beam
endif
if udg_VR_CurrentLevel[ID] <= 1 then
set udg_VR_CurrentLevel[ID] = 1
set b[ID] = true
endif
endif
endloop
loop
set u = FirstOfGroup(udg_VR_TempGroup)
exitwhen u == null
set ID = GetUnitUserData(u)
if not b[ID] then
call GroupAddUnit(udg_VR_MainGroup, u)
endif
call GroupRemoveUnit(udg_VR_TempGroup, u)
endloop
if FirstOfGroup(udg_VR_MainGroup) == null then
call DisableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Void_Ray_Stop takes nothing returns nothing
set gg_trg_Void_Ray_Stop = CreateTrigger( )
call DisableTrigger( gg_trg_Void_Ray_Stop )
call TriggerRegisterTimerEvent( gg_trg_Void_Ray_Stop, 0.03, true)
call TriggerAddAction( gg_trg_Void_Ray_Stop, function Trig_Void_Ray_Stop_Actions )
endfunction