elmstfreddie
The Finglonger
- Reaction score
- 203
Alright, I'm completely rejigging this tutorial!
Ok, so the triggering given will create a circle of explosives around the caster, then after 2 seconds they explode dealing 250 damage each in a 50 radius (that's definitally overpowered for a map, but just edit "Kaboom! (Barrel O' Explosives)" to edit the stats) Although this effect is intended for a hero ability, you could easily edit it for cinematics.
For this, you will need 5 variables:
Variable1: Real
Variable2: Player
Variable3: Point
Variable4: Unit
Variable5: Unit Group
Variable6: Point (my attempt to remove memory leaks)
Trigger1: Activation Trigger
Trigger2: Creation Trigger
Trigger3: Exploding Trigger
OK, in order for this to work you need 2 abilities and 2 units:
Ability1: Kaboom! (Barrel O' Explosives) base this off of Kaboom! (Goblin Sappers) and then just change the stats
Ability2: Call it ring of fire or whatever you wish, but this is the "dummy ability". Make it fan of knives, and remove most of the data. Get rid of it's range, damage, and model files.
Unit1: Hero, whatever, the activation unit (caster) give it "Ability2"
Unit2: The exploding unit, give it ability "Kaboom! (Barrel O' Explosives)
That should fix the memory leaks, sorry, i'll get used to this one day...
By the way, you need the wait .2 seconds because if you don't they don't have time to cast kaboom! (even though theres no cast time). Probaly would work with less than .2, but I didn't care because it still removes them from the game
Ok, so the triggering given will create a circle of explosives around the caster, then after 2 seconds they explode dealing 250 damage each in a 50 radius (that's definitally overpowered for a map, but just edit "Kaboom! (Barrel O' Explosives)" to edit the stats) Although this effect is intended for a hero ability, you could easily edit it for cinematics.
For this, you will need 5 variables:
Variable1: Real
Variable2: Player
Variable3: Point
Variable4: Unit
Variable5: Unit Group
Variable6: Point (my attempt to remove memory leaks)
Trigger1: Activation Trigger
Code:
Trigger 1
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Circle of Doom
Actions
Set Variable2 = (Owner of (Casting unit))
Set Variable3 = (Position of (Casting unit))
Set Variable4 = (Casting unit)
Trigger - Turn on Trigger 2 <gen>
Trigger - Turn on Trigger 3 <gen>
Trigger2: Creation Trigger
Code:
Trigger 2
Events
Time - Every __ seconds of game time
Conditions
Actions
Set Variable6 = (position of Variable3 offset by 450 towards Variable1 degrees)
Unit - Create 1 Peasant for Variable2 at Variable6 facing Variable1 degrees
Set Variable1 = (Variable1 + 5.00)
Unit Group - Add (Last created unit) to Variable5
Trigger3: Exploding Trigger
Code:
Trigger 3
Events
Time - Every __ seconds of game time (must be equal to or less than the number in Trigger 2)
Conditions
Variable1 Greater than or equal to 360.00
Actions
Set Variable1 = 0.00
Trigger - Turn off Trigger 2 <gen>
Wait 2.00 seconds
Unit Group - Pick every unit in Variable5 and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Neutral - Kaboom! (Position of (Picked unit))
Wait 0.20 seconds
Set tempPosition = (Position of (Picked unit))
Unit Group - Pick every unit in Variable5 and do (Unit - Remove (Picked unit) from the game)
Custom Script: call RemoveLocation(udg_tempPosition)
Trigger - Turn off (This trigger)
OK, in order for this to work you need 2 abilities and 2 units:
Ability1: Kaboom! (Barrel O' Explosives) base this off of Kaboom! (Goblin Sappers) and then just change the stats
Ability2: Call it ring of fire or whatever you wish, but this is the "dummy ability". Make it fan of knives, and remove most of the data. Get rid of it's range, damage, and model files.
Unit1: Hero, whatever, the activation unit (caster) give it "Ability2"
Unit2: The exploding unit, give it ability "Kaboom! (Barrel O' Explosives)
That should fix the memory leaks, sorry, i'll get used to this one day...
By the way, you need the wait .2 seconds because if you don't they don't have time to cast kaboom! (even though theres no cast time). Probaly would work with less than .2, but I didn't care because it still removes them from the game