I need some help with a spell.

Astal

New Member
Reaction score
1
Im making the Witch King from lord of the rings, and i want him to have a passive aura that will reveal any hero on the map whos hp is below a certain % but i have NO idea how to even go about this. All help is appreciated. I have an aura skill but no idea how to start scripting it.
 

Squishinator

New Member
Reaction score
3
Trigger:
  • Untitled Trigger 007
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
      • ((Triggering unit) has buff Acid Bomb) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Percentage life of (Picked unit)) Less than or equal to 10.00)) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of (Picked unit)) to a radius of 512.00


some of the values you will have to change and you will have to give the unit who has the ability a buff. I hope thats not too cloudy of an explanation for you.
 

Astal

New Member
Reaction score
1
Trigger:
  • Untitled Trigger 007
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
      • ((Triggering unit) has buff Acid Bomb) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Percentage life of (Picked unit)) Less than or equal to 10.00)) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of (Picked unit)) to a radius of 512.00


some of the values you will have to change and you will have to give the unit who has the ability a buff. I hope thats not too cloudy of an explanation for you.

that seems a lot simpler than what i was thinking lol which is good, i need help finding (Percentage life of (Picked unit)) Less than or equal to 10.00) in the editor.
 

Kikac_NNGK

Well-Known Member
Reaction score
33
Trigger:
  • Untitled Trigger 007
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
      • ((Triggering unit) has buff Acid Bomb) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Percentage life of (Picked unit)) Less than or equal to 10.00)) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility from (Position of (Picked unit)) to a radius of 512.00


some of the values you will have to change and you will have to give the unit who has the ability a buff. I hope thats not too cloudy of an explanation for you.

The Picked unit in the unit group picking is not working. Use Matching unit instead


EDIT: Ups didn't saw that what Renendaru saw. He's right. U should use some variable for a unit that has that buff
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
That code will make a trail of revealed area. :/ I would instead use share vision, instead of visibility modifiers.

Edit: There's also no (Triggering Unit) so the code will do nothing.
 

Jedimindtrixxx

┻━┻ ︵ ¯\(ツ)/¯ ︵ ┻━┻
Reaction score
168
that trigger squishinator posted wont work properly cuz there is no triggering unit for the conditions.

EDIT: GOD DAMN renendaru beat me to it :/
 

Astal

New Member
Reaction score
1
What can I do to make it work lol, could I have 2 events in one script? Such as A hero learning a spell and every .30 seconds?

What if i did it like this

Code:
Initialize Presence of the One
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Presence of the One 
    Actions
        Set WitchKing = (Learning Hero)

Code:
Presence of the One
    Events
        Time - Every 0.30 seconds of game time
    Conditions
        (WitchKing has buff Presence of the One ) Equal to True
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Percentage life of (Picked unit)) Less than or equal to 30.00)) and do (Actions)
            Loop - Actions
                Unit - Grant shared vision of (Picked unit) to Player 1 (Red)
 

Kikac_NNGK

Well-Known Member
Reaction score
33
What can I do to make it work lol

Just make a variable for the buffed unit in some other trigger. For ex.
Trigger:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *Your Ability*
    • Actions
      • Unit Group - Pick every unit in (Units within 100.00 of (Which point u want) matching (((Matching unit) has buff *Your Buff*) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Unit = (Picked unit)
      • Trigger - Turn on (*The Checking trigger*)
 

Astal

New Member
Reaction score
1
Just make a variable for the buffed unit in some other trigger. For ex.
Trigger:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *Your Ability*
    • Actions
      • Unit Group - Pick every unit in (Units within 100.00 of (Which point u want) matching (((Matching unit) has buff *Your Buff*) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Unit = (Picked unit)
      • Trigger - Turn on (*The Checking trigger*)

Will the way I did it above work? Im trying to find someone to help me test it.

K the way i did it works, thanks guys
 

artix123

New Member
Reaction score
4
I'm not sure but does the Unit Group thing leak? I remember there's such thing as

Trigger:
  • Custom script: call DestroyGroup (udg_Temp_Group)


So instead of "Pick every unit in (blah blah blah)" first set Temp_Group (or whatever you want) to your (units within blah blah blah) and then pick every unit in Temp_Group to do action. Then call the remove group custom script.
 

Astal

New Member
Reaction score
1
What could I use other than
Code:
Unit - Grant shared vision of (Picked unit) to WitchKingOwner

That reveals everything that that player can See,i just want a small circle around the unit.

Somthing like this?
Code:
Visibility - Create an initially Enabled visibility modifier for WitchKingOwner emitting Visibility from (Position of (Picked unit)) to a radius of 512.00
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top