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

How do i create an image that follows a unit

Status
Not open for further replies.
Level 10
Joined
Oct 31, 2009
Messages
352
The engine itself should have functions for this and you might be able to use n' abuse em' with Vjass, but if for some reason blizz has blocked that stuff then you would need to import bar models and use them as special effects or dummy units in-game.

Can't think of any other way
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
There are available commands for adjusting the position of an image. Take the bar in Tides of Blood, for instance; they probably have a few image files that represent different sections of the bar. The position of these images are offset from the position of the unit that they are associated with.
 
Level 2
Joined
Aug 1, 2009
Messages
9
There are available commands for adjusting the position of an image. Take the bar in Tides of Blood, for instance; they probably have a few image files that represent different sections of the bar. The position of these images are offset from the position of the unit that they are associated with.

ive made bars like that but i cant understand how to make them show up.
 
Level 8
Joined
Jun 26, 2010
Messages
530
The position of these images are offset from the position of the unit that they are associated with.

Or you can attach them to the overhead of the desired unit


lol, didn't knew about that one, looks very useful, but, there's a way of making it look more like a Health bar but purple?

I've seen on the net, don't remember where, a plug-in that showed mana bars aboe units jsut like health bars, you can try that and ask for permission to mod it, altough this wouldn't be easy. And only the ones with the plug are able to see it, but if you're making a Single Rpg Campaign, you can ask for players to install it. Just a crazy idea.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Or you can attach them to the overhead of the desired unit

You can't "attach" images to unit attachment-points; the only method available in JASS is to set the image's coordinates, using native SetImagePosition takes image whichImage, real x, real y, real z returns nothing.

lol, didn't knew about that one, looks very useful, but, there's a way of making it look more like a Health bar but purple?

Well there is native SetImageColor takes image whichImage, integer red, integer green, integer blue, integer alpha returns nothing that is available for modifying the color of your image; I imagine under proper circumstances this could be used to diversify what color is displayed, otherwise you're limited to the texture that is used.

that showed mana bars aboe units jsut like health bars

Any unit with mana will have a mana-bar displayed over their head.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I'm speaking about when you use the ALT key, it brings up both the health and mana bars. You must be talking about the option setting "Always display health bars" in the main screen options.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
In a completely default situation where there is a health bar visible (only available with default settings while holding ALT) there will also be a mana bar that is visible, if the unit has mana.
 
Status
Not open for further replies.
Top