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

Impersonating Spell

Status
Not open for further replies.
Level 28
Joined
Aug 7, 2011
Messages
1,638
So I want to create a target spell that lets you impersonate a unit, meaning, you gain control of it, but at the same time the owner of the targeted unit keeps his control. Both of you can now control this unit. When you cast the spell, the caster disappears (is hidden).
Your version of the controlled unit however has to have 2 more spells that the original owner can't see, those being "Reveal Self" - which lets you reveal yourself (destroys the targeted unit and unhides the caster) and "Impersonate", the spell you first cast, so that you can keep on impersonating without having to reveal yourself.

In short:
Caster targets Target
Both players have control of Target
Caster Player has 2 more spells to his version of the targeted unit


Edit: Accidently clicked "Submit". So, I searched for Naix' ultimate spell but couldn't find it, but I guess I can figure this out. My main issue is with the 2 owners. Is this even possible?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You need some really advanced mechanics for this and most native behavior will not work any more.

But what you can do is have a third player that is not used in the game for anything else that both players have advanced shared unit control enabled.
This way both players can control his units.

However, there is some serious problem in how that unit should target other units... who are enemies? who are allies? etc etc etc.

Making spells that only certain players can see is actually possible as recently mentioned in a very interesting thread.
At least, using the visibility option that Channel provides.

Another, less buggy and more powerful, approach is to not have the unit controllable in the first place.
What you want to have is two units where one is the one you click on and the other is an invisible one that only has a model for the players that are allowed to control the unit (also (partly) described in that interesting thread).
Then you can change the model back from none/dummy to the clickable model for the player that needs to control the unit.
This way, you dont need a third player (or more if you want multiple players have the access to the same unit).
The drawback is that you would need a controller system that properly redirects orders and doubles units to give them appropriate controller dummies.
That... is quite hard.

If you only need very few use cases for this feature, then you could try to do it with the first approach.
If not, then you have to consider making something else.
If you really are determined to make such a thing, it does force you to have a properly working unit dummy controller system... or however you want to call it.

TLDR:
Possible: Yes
Difficulty: Extremely Hard
 
Level 28
Joined
Aug 7, 2011
Messages
1,638
It's enemies and allies are the same as the targeted player's unit. It can and should attack your own units while in the hidden form. It acts as a spy you see. You just have control over it, and can return it back to normal at any time (and thus kill the targeted unit in the process, which is supposedly already dead, because it's impersonated).

Interesting, I'll check this thread out.

I thought it would be complicated. I am extremely bad at triggers but I'll give it a shot before giving up, as always. Stubborn, you see.

Thanks for the guidance.
 
Status
Not open for further replies.
Top