HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Chain Lightning help

04-07-2004, 03:55 PM#1
Progniss
Ok I wanted to make this spell where every 30 kills by a certain hero i call Hybrid gets chain lightning and auto uses it then loses it again. This is what I tried to do.

E) Unit dies
C) Hybrid [u]Equal to[/b] Attacking unit
A) set variable = HybridLight (+1)
A) If Hybridlight = (30) then Add Chainlightning to Hybrid Order Hybrid chainlight on closest unit Remove Chainlightning set variable = (0), Else do nothing

Typed this from memory but it didnt work in game so i would appriciate some help thanks.
04-07-2004, 05:20 PM#2
BattleBotv8.2
Event:
Unit Generic Event:
Unit kills

Condition:
Unit-Type equals to hero
(Do unit-type comparisen if you want)

Action:
Unit - Set custom value
Set custom value of killing unit to Custom value of killing unit + 1
If/Then/Else
If
Custom value of killing unit greater than or equal to 30
Then turn on Trigger 2
Else
Do nonthing

Trigger 2 (Off at start):
Event:
Every 1 second

Condition:
Number of units in X Range of XHero greater than or equal to 1

Action:
Create 1 DummyUnitFor owner of XHero at position of XHero
Order last created unit to chain lightning random unit in XRange of hero
Set custom value of XHero to Custom Value of XHero - 30
Set last created unit as UnitVarible
Wait XSeconds
Remove UnitVarible from the game
04-07-2004, 05:33 PM#3
Progniss
is there any way to do that in one trigger?
04-07-2004, 06:01 PM#4
demodl
Using just one trigger would get very complicated. But, what if the first triger's action just adds the chain lighning ability, let the player decide when to use it, and once it is used: remove the ability, reset/start the counter.
If this doesn't fit your scenario, well, maybe it can be adjusted to do so. Hope it helps or inspires.
04-08-2004, 03:10 PM#5
Progniss
BattleBot thanks for your help but I cannot find

Order last created unit to chainlightning random unit in XRange of Hero.
04-08-2004, 04:18 PM#6
Progniss
Nevermind I found it. I am going to test it. I will post back if it works or not. Thanks again.
04-08-2004, 04:39 PM#7
Progniss
Ok it kind of worked. Heres what I have.

E) Unit - A unit Dies
C) Hybrid Equal to (Killing unit)
A) Set Hybrid_Kills = (Hybrid_Kills + 1)
A) If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Hybrid_Kills Greater than or equal to 120
(Number of units in (Units within 700.00 of (Position of Hybrid))) Greater than or equal to 1
Then - Actions
Unit - Create 1 Ambient Moxie for (Owner of Hybrid) at (Position of Hybrid) facing (Position of (Triggering unit))
Set Hybrid_Wisp = (Last created unit)
Unit - Order Hybrid_Wisp to Orc Far Seer - Chain Lightning (Random unit from (Units within 1500.00 of (Position of Hybrid) matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True))))
Set Hybrid_Kills = -120
Wait 1.00 seconds
Unit - Remove Hybrid_Wisp from the game
Else - Actions
Do nothing

It created the wisp but the wisp would not attack.
04-08-2004, 10:02 PM#8
Progniss
anyone have any ideas?
04-08-2004, 11:54 PM#9
cideh
Did you add an ability based off chainlightning to the dummy unit?
04-09-2004, 12:22 AM#10
BattleBotv8.2
Convert the order into custom text and use that, should work.
04-09-2004, 02:11 AM#11
Progniss
The dummy unit already has the ability on him.

Wait convert the trigger into a custom text then copy paste what you wrote and swap it with what I have?