Ability that would show the range of a unit for 3 seconds?

X-maul

AKA: Demtrod
Reaction score
201
I want to have an ability that shows the weapon range of a unit when it uses it (using a weapon range actor) but only for 3 seconds after the ability is used, after that, it should disapear again.

How would I do this? (Also I asume I need to create an actor for each unit using the ability?)
 

Dave312

Censored for your safe viewing
Reaction score
269
I'm not quite sure how you want this to work. Does the unit use this ability and you can see nearby enemy unit ranges? Or a targeted units range? Or does it just show the casters range?

Either way, just make the ability give your unit a behaviour that lasts 3 seconds and then use a range actor to show the range of the unit when the unit has the behaviour. You will need to create a range actor to every unit affected by this ability.
 

X-maul

AKA: Demtrod
Reaction score
201
I want to show the range actor for the unit using the ability, and ok - I'll have a look at it :)
Thanks
 

X-maul

AKA: Demtrod
Reaction score
201
I have made the actor and made it work, but I cant for the life of me figure out what term to put to make it only work when I cast it with a specific unit?
The actor events looks like this:
Code:
ActorOrphan
  Destroy
Abil.ShowRange
  Create
Behavior.ShowRange.Destroy
  Destroy
I asume I'll have to put a term at the "Abil.ShowRange" event, but what kind of term?
(btw, is there a way to copy an actors events as text?)
 

Dave312

Censored for your safe viewing
Reaction score
269
It looks like you are using a behaviour, so use these events:
Code:
ActorOrphan
  Destroy
Behaviour.ShowRange.On
  Create
Behaviour.ShowRange.Off
  Destroy

Unfortunately I do not know of a way of copying events as text.
 

X-maul

AKA: Demtrod
Reaction score
201
It looks like you are using a behaviour, so use these events:
Code:
ActorOrphan
  Destroy
Behaviour.ShowRange.On
  Create
Behaviour.ShowRange.Off
  Destroy

Unfortunately I do not know of a way of copying events as text.
Uhm, well I only use a behavior (The ability just applies a behavior to the caster, which will last for 3 seconds) to know when to destroy the actor.
The problem is not that it does not show, the problem is that the actor displays no matter what unit uses the ability. I only want this to be shown when a Marine uses the ability.

Would I have to create an ability for each unit then?
 

Dave312

Censored for your safe viewing
Reaction score
269
You just need to create a validator of the type Unit Type and set the Validator: Value property to Marine. Then on your actor, add a term of the type ValidateUnitType and set the Validator property to your validator.

You do not need to create a new ability for each new unit but rather just create a new range actor and new validator.
 
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