• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help with unselecting a Hero

Status
Not open for further replies.
Level 10
Joined
Aug 19, 2008
Messages
491
Hey dudes! :grin:
I'd like some help with a spell I'm making.
See, I want the 'special' effect of it to be that my Hero loses all controll of his enviornment and starts attacking at random
(meaning the player should lose all controll of the Hero)

I've tried two ways of approaching this:
1: Adding Locust to the unit.
2: Unselecting the Hero with "Events - A Player selects a Hero. Actions - Unselect Hero".
(EDIT) 3: Changing the owner of the Hero.

The first one didn't work because it made it invurnurable aswell, and the second one didn't work cause there's no "Event Response - Selected Unit", neither in GUI or Jass. The third one isn't possible due to the initial architecture of the map.

Any ideas?
+Rep to the dude who solves this first with the best solution* :thumbs_up:



(Btw I'll be gone a couple of hours after posting this)
 
Last edited:
Level 4
Joined
Apr 18, 2009
Messages
127
Just replace the owner of hero with neutral hostile or any other player...? Such as Neutral Hostile
 
Level 8
Joined
Nov 9, 2008
Messages
502
I'm so sure I saw a function that makes a unit uncontrollable or unselectable but I can't find it! Maybe it was back when I used WEU briefly...

EDIT: I'm not crazy, this is what I was remembering;

  • Actions
    • Game - Enable selection and deselection functionality (Disable selection circles)
Not exactly helpful, though, as it will apply to all players.

However, there is a hero in map Rabbits vs Sheep that does what your after with a spell called "unstable concoction"
 
Level 4
Joined
Apr 18, 2009
Messages
127
I'm so sure I saw a function that makes a unit uncontrollable or unselectable but I can't find it! Maybe it was back when I used WEU briefly...

EDIT: I'm not crazy, this is what I was remembering;

  • Actions
    • Game - Enable selection and deselection functionality (Disable selection circles)
Not exactly helpful, though, as it will apply to all players.

However, there is a hero in map Rabbits vs Sheep that does what your after with a spell called "unstable concoction"


Is there a way to edit the selection scales? Cus then you might set it to very low, and no one would be able to target the hero.
 
Level 10
Joined
Aug 19, 2008
Messages
491
I'm so sure I saw a function that makes a unit uncontrollable or unselectable but I can't find it! Maybe it was back when I used WEU briefly...

EDIT: I'm not crazy, this is what I was remembering;

  • Actions
    • Game - Enable selection and deselection functionality (Disable selection circles)
Not exactly helpful, though, as it will apply to all players.

However, there is a hero in map Rabbits vs Sheep that does what your after with a spell called "unstable concoction"

Well that was helpful indeed, but unfortunatly I found another solution :wink:
It's actually more interesting, and adds a little twist to the spell.
What I did is that I added a periodic event, and every time it fired, I ordered the unit to attack move to a random point.
Since it's Jass-based, I can even change the time between events acording to Events, so the higher level, the longer wait between Attack Move orders (meaning that as you get more experienced, the more controll over the Hero you maintain)
However it's got a problem: I can't abort this function :sad: so it will fire off for eternity. I'm gonna make a new thread about it and link it here (in an edit of course)

I'm not sure what to considers this post now :bored: since I found a solution, but it changed the spell's mechanics.

EDIT: Here it is



You could temporarily morph him into a unit with a 0.1 selection scale and no voice set.
And what if you click-drag select him?
 
Last edited:
Level 10
Joined
Aug 19, 2008
Messages
491
There's no other way, but, now im thinking, does Zone Indicator have attachment points? it is not selectabe, and you could attach the model to it.

You're right, there is no other way. So I went around the problem and found the perfect solution, though it changes the mechanics of the spell.
As for the Zone Indicator, I won't use it. It's just that I don't like custom models that much, they often bug themselves.
 
Level 4
Joined
Apr 18, 2009
Messages
127
The selection scale would not help anyway, cus you could spam F1 for hero selection.
 
Status
Not open for further replies.
Top