A little help please...

Vizion_X

New Member
Reaction score
2
Hi, I am making a "trigger skill" and need a little help figuring out how to do something. The skill is a metamorphasis skill that deselects the Hero, moves him to a point, moves him back to his original location, then reselects him. The problem is that I don't want the Hero to be selectable during this time and I can't figure out how to do it. I've gotten pretty frustrated with it and I hope it's not something simple that I overlooked. Anyway, how do I make a Hero unselectable for a few seconds?

Thanks in advance for any assistance.
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
give him the locust ability, then he can't be clicked or attacked
 

Vizion_X

New Member
Reaction score
2
I tried that, but once the metamorphasis expired, his original "form" retained the locust ability and the Hero was unselectable from then on. And that ability cannot be added or removed with a trigger. Plus I want him to be able to be attacked, just unselectable.

Nonetheless, thank you for a quick reply.
 
S

Sorax

Guest
not sure if this will work :)

Code:
Events
    Unit - A unit Begins casting an ability
Conditions
    (Ability being cast) Equal to Metamorphosis
Actions
    Unit - Add Locust to (Casting unit)

Code:
Events
    Unit - A unit Stops casting an ability
Conditions
    (Ability being cast) Equal to Metamorphosis
Actions
    Unit - Remove Locust from (Casting unit)
 

Vizion_X

New Member
Reaction score
2
Yeah, I tried that but the Locust ability doesn't show up on the ability list when using the Add Ability action. Plus I want the unit to be able to be attacked while he's morphed, just unselectable.
 

FireBladesX

Eating my wings!
Reaction score
123
You need custom scripts to add and remove the locust ability.

You should use a quick periodic timer to unselect the unit to whoever's clicking it for true unselectability, but an easier method is whenever the unit's selected, do Selection: Deselect Triggering Unit for Triggering Player.
 

Vizion_X

New Member
Reaction score
2
XD I knew it was going to end up being something simple. I never thought to deselect with a periodic trigger. Made the periodic deselect, tested it, and it works great. Thanks.
 

Ashcat

Hellooo
Reaction score
68
Or use Unit - Hide, and Unit - Unhide. That should also take care of wherever you're trying to move it if you just want it to be invisible, and it'll get rid of the little deselection lag that you're probably experiencing with that method.
 

jhnam95

Active Member
Reaction score
12
You can trigger the unit so that the owner can't click him. You can remove the owner's selection too. Then move the unit instantly (or have him blink if you want, no difference) and then give owner the selection back.

EDIT: Go type Omnislash in the search. Its triggers are similar.
 

Vizion_X

New Member
Reaction score
2
Thanks for the additional replies. Hiding wouldn't really work, because I want the unit to remain visible throughout the morph. It's an attack skill using a secondary model file to mimic a bladestorm type ability however, the trigger is what moves the unit. So, I need the unit visible for the duration of the effect but I want him unselectable. I will, however, check out that omnislash trigger you mentioned jhnam95.

Edit: By the way, can you remove the ability to select a unit using the standard trigger editor, or does it have to be a custom script. I'm fairly fluent with the trigger editor, but know nothing about writing custom scripts.

Edit #2: I just checked out the Omnislash trigger. Isn't quite what I need as you can still select the unit during the Omnislash effect. I need the unit to be completely unselectable for the duration of the effect (roughly 7 seconds).
 
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