Beams of light strike a random unit every 1.5 seconds.

troyboy

New Member
Reaction score
5
How would i make an ability, (kinda like eclipse from dota luna moonfang), that when activated, will send 5-10 bolts of light at a random unit(unit different each beam).

I want it to be like this.

Code:
starts ability
ability  = spell

Beam 1 unit
Wait 1.5 seconds.
Beam a different unit
Wait 1.5 seconds.
Beam a different unit
Wait 1.5 seconds.
Beam a different unit

something like that.
By beam i mean holy light, doing 200 damage.
 

minikrampan

Ultra Cool Member
Reaction score
28
Something like this

Start the effect of an ability

your ability

set castingunit = casting unit
turn on trigger 2
wait 10 seconds.
turn off trigger 2

trigger2
timer every 1.50 s of game

pick every unit in (random unit from (units within 500 range of (casting unit)) and do)
Cause Casting unit to damage picked unit for 200 damage
special effect create special effect on picked unit


Sry for the harsh code don't got we atm.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) <Spell Name>
    • Actions
      • Set castingUnit = (Owner of (Casting unit))
      • Set tempGroup = (Units within 600.00 of (Position of (Casting unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to (==) True))
      • Trigger - Turn on Untitled Trigger 002 <gen>

Trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 0.60 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in tempGroup and do (Actions)
            • Loop - Actions
              • Unit - Order castingUnit to <Spell> (Random unit from tempGroup)

That should do it;
Though it leaks.
 

troyboy

New Member
Reaction score
5
ur second trigger obviously wont work, as the spell is not on the triggering unit, so will require a dummy
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You said like Luna from DotA.
She has Lucent Beam;
Which is the basis for the Eclipse.

EDIT: You know it requires a dummy, so do it ;) .
 

vypur85

Hibernate
Reaction score
803
Code:
Event
 A unit starts the effect of an ability
Condition
 Ability being cast Equal to YourAbility
Actions
 Unit group - Remove all units from UnitGroupVar
 For every TempInteger from 1 to 10 do multiple actions <-- [I]Custom Integer loop[/I]
   Loop - Actions
     Set TempGroup = Units within 500 range of Position of (Triggering unit) matching (Matching unit) belongs to an enemy of (Owner of (Triggering unit)) Equal to True and (Matching unit) is alive Equal to True and [B](Matching unit) is in UnitGroupVar Equal to False[/B] <-- [I]Bolded part is important[/I]
     Set TempUnit = Random unit from (TempGroup)
     Unit Group - Add TempUnit to [B]UnitGroupVar[/B] <-- [I]A Unit Group variable which you don't want to destroy[/I]
     Unit - Cause (Triggering unit) to damage TempUnit.....
     Special effect - Whatever effect you like...
     Wait 0.30 game-time seconds
 Unit group - Remove all units from UnitGroupVar

This is not MUI. Try it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top