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

Making allies look like enemies

Status
Not open for further replies.
Level 5
Joined
Jun 21, 2013
Messages
116
I am making a hero arena map and I need help making few abilities for a hero which would do the following:
Ability 1: For targeted player only, allies should look like enemies (4 allies should take an appearance of 4 enemies, but the effect of this ability should only be visible to one player)
Ability 2: Targeted player should look normal to himself, but look like randomly selected enemy to his allies
Ability 3: Make a unit who looks like one of the allies (can be an illusion, too), but visible only to the target enemy

However, I cannot find any way to make this work. Any ideas for a trigger for any of them?
 
Usually one posts in Trigger & Scripts if you have a code attempt already.
For questions how to achieve something, or something similar, that's for: World Editor Help Zone

Would changing the color for enemies be enough/etc? Because I'm not sure how much more you can simulate a player change. For example when you target or select the unit, you would still mention the difference probably. (red selection circle maybe)

I'm not sure what "randomly selected" means for #2.

I'm not very sure what #3 is is. Could you re-phrase?
 
Level 5
Joined
Jun 21, 2013
Messages
116
Usually one posts in Trigger & Scripts if you have a code attempt already.
For questions how to achieve something, or something similar, that's for: World Editor Help Zone

Would changing the color for enemies be enough/etc? Because I'm not sure how much more you can simulate a player change. For example when you target or select the unit, you would still mention the difference probably. (red selection circle maybe)

I'm not sure what "randomly selected" means for #2.

I'm not very sure what #3 is is. Could you re-phrase?

Oh, sorry, I was in a hurry when I was posting. If a moderator could move the thread, so I don't have to make another, I would appreciate it.

Now about the trigger: Changing colors would not be enough (and the trigger for that is fairly simple, so I wouldn't really need help). The goal is so that the player cannot distinguish allies from enemies.

You can assume "randomly selected" is a unit-type variable not equal to 'no unit'. Random selection of a unit is a simple trigger and easily coded, making him appear different only to his allies is the problem.

Number 3 should create a unit under the control of caster (of the type which is currently saved in unit-type variable) at the position of the caster, but that unit should only be visible for the player targeted by the ability. Hope it's clear now.
 
#3 You can add a ghost ability to make the unit invisible for others.

#2 Tht's not really possible to achive easily and dynamicly in game. You can not simply change the model itself in game with a command.
I found this, though, to change a texture How to make a model change textures ingame

#1 You must define then what should be same and what not. One can not simply make it 100% indentical so it is like your unit, even it's not.
If a moderator could move the thread, so I don't have to make another, I would appreciate it.
You can always use the "Report" button to make staff aware of a problem. For example thread moving to the correct section. I reported now already.
 
Level 5
Joined
Jun 21, 2013
Messages
116
#3 You can add a ghost ability to make the unit invisible for others.

#2 Tht's not really possible to achive easily and dynamicly in game. You can not simply change the model itself in game with a command.
I found this, though, to change a texture How to make a model change textures ingame

#1 You must define then what should be same and what not. One can not simply make it 100% indentical so it is like your unit, even it's not.

You can always use the "Report" button to make staff aware of a problem. For example thread moving to the correct section. I reported now already.

Ghosts are visible to allies, only. I am trying to make it so it's visible to caster, allies and target enemy, while being invisible to other enemies (but with no transparency). The goal of the ability would be making one enemy think one of your allies is low on health and running away to make him chase the unit which doesn't exist for anybody else in his team.

If 2nd isn't possible, the I guess 1st is also impossible, since the unit's model should be changed to appear different than it already is.
 
while being invisible to other enemies (but with no transparency)
no ghost and no transparencey? Why not transparent?

One could make it invisible then with changing vertex color and modify it's alpha value for enemies which should not see it.

It will be weird, though to make it really non-existent for other players (for example HP bar, or target for AoE spells, etc), but still making it normal damage-able and target-able etc for the one specific enemy.
 
Level 5
Joined
Jun 21, 2013
Messages
116
no ghost and no transparencey? Why not transparent?

One could make it invisible then with changing vertex color and modify it's alpha value for enemies which should not see it.

It will be weird, though to make it really non-existent for other players (for example HP bar, or target for AoE spells, etc), but still making it normal damage-able and target-able etc for the one specific enemy.

My bad, didnt explain well enough; by no transparency, I meant that it should fully resemble another unit. When you look at Shade, for example it's see-through. And since goal here is to trick an enemy into chasing a basically non-existing unit, that unit shouldn't be invisible, since any form of invisibility (Wind Walk, Permanent Invis, Invisibility...) makes unit see-through.

But, I assume World Editor cannot do some things. Thx for the help, but I think this idea is impossible to implement.
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
You can make it invisible with changing transparency only for one player. So it will be visible for your (one) enemry.
This still leaves the selection circle and HP bar visible to the allies of the targeted enemy player. And they can drag-select to select the unit. And any SFX on it will still show. Maybe locally adding locust would solve these problems but I'm inclined to believe that this would still be prone to desyncing somewhere along the line.

@PajdomanMokri, what you want to do is straight up impossible in the WC3 engine. I tried to do this a while ago to have a unit flashback and see all the other units it has previously killed and was not able to find an acceptable solution. The only way to have a unit visible to specific players without abusing permanent invisibility/true sight/shared vision (like suggested in the other thread, which it seems you can't do) is to create it in a GetLocalPlayer() block for only the appropriate player. This immediately desyncs the game. As I recall even creating it outside the block and hiding it locally desyncs if the unit is subsequently interacted with in any way.

Similarly there's no way to accomplish #1 and #2 because it's impossible to change a unit's model in-game without also changing it into another unit-type.

Actually to clarify my above statement: you can change models by having different animation tags (see: mountain giant or mounted/unmounted hippogriffs) but that would require any unit you want to change to have a custom model with new animations for the tagged version.
 
Last edited:
Status
Not open for further replies.
Top