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.