• 🏆 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!

Aura that will benefit only one specific unit.

Status
Not open for further replies.
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hello guys is it possible to that only one specific unit will benefit from an aura? For example I have a dummy unit that has a Battle Drums aura, and when the Paladin hero goes near he will benefit from it and only him can receive the buff.

Edit: Sorry due to my eyes being tired, I posted this thread in the wrong section. Mods can move this.
 

Em!

Em!

Level 25
Joined
Jan 9, 2004
Messages
635
Just mark that unit as suicidal in "Targets Allowed" or as an ancient whatever. If you pick suicidal just untick suicidals in zeppeling transports to allow them to be cargo.

Then tick the unit as a suicidal or ancient in "Unit Classification".
 
Level 12
Joined
May 22, 2015
Messages
1,051
If that´s even an issue then fine but Jass is just so damn ugly.

JASS is not that ugly. It is like regular code. If you do any programming, it is only ugly when you convert GUI into JASS (because it is auto-generating function names and stuff and it is just extremely ugly) or if the person who writes it is a bad programmer.

However, I do think non-programmers will find it always looks rather hideous. Mostly just because it is like reading a big text file with a bunch of mumbo jumbo stuff in it.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Why use triggers/jass when this is entirely possible solely in object editor :/
Why use object editor if this can be done in JASS?

The best solution for this is to make the aura target 'self' and add/remove it via a little trigger.
Yes but that still leaves us open with the problem of when the unit is in range...
How would you think your trigger would look like?

I would abuse the unit gets in range event and check if triggering unit is equal to X
This will be able to detect it.

IIrc, you dont need JASS if the dummy unit is not generated through the game.
If you only have preplaced dummy units, this can work without JASS.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
I would abuse the unit gets in range event and check if triggering unit is equal to X

You will need jass to make this work without leaks though.

Though it is not time accurate meaning after a unit gets in range, it will only trigger after some delay so it is basically like periodically picking all units within a certain range ofunit with aura.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Yes but that still leaves us open with the problem of when the unit is in range...
How would you think your trigger would look like?
A "Unit comes in range" event and then periodic checks whether it's still in range.
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Sorry for my late response guys, I'm currently on my Grandmas place.

What does the aura do?

The auras are not so special because I'm planning to use default WC3 auras like Battle drums, Endurance etc....... I just want an specific unit benefit from an aura when he goes near to a dummy and only him will benefit into it.

Why use object editor if this can be done in JASS?

The way you say it looks like JASS is much better and efficient, however I'm not quite good and unable to understand more about JASS. So doing it in JASS by myself would be really hard for me, but anyway I'll try it first.

IIrc, you dont need JASS if the dummy unit is not generated through the game.
If you only have preplaced dummy units, this can work without JASS.

I was planning that when a player picks or trains the specific hero that would only benefit from the aura, dummies will be created in certain areas of the map. They wont be destroyed when the specific hero is not in range.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
In that case, you dont create the units throughout the game and you can use simple GUI triggers that when a unit comes in range of your other unit... maybe even specific unit comes in range but I doubt it.

The point is that those dummies wont get destroyed so you wont have to recycle the trigger to avoid event leaks. (That would require JASS or really stupid trigger setup.)

You just use the Unit in range event and add the aura to the hero (self, invulnerable, vulnerable target).
When it leaves the range (also event added), you remove the aura from the hero and remove the buff(s).
 
Status
Not open for further replies.
Top