• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Tank Rotation System

Status
Not open for further replies.
Level 7
Joined
Jun 8, 2010
Messages
283
Does anyone know how Illidan(evil)X made his tank rotation system? From an old post, I read that he created two separate models, one for the tank head and one for the tank body. With two separate systems he then used a Trigger to "lock" the tank head model to the "Head" attachment point of the tank body model.

Sadly I tried searching for the post and I cant remember but its somewhere in either Triggers and Scripts or World Editor Help forum sections.

I honestly really dont care about the tank system itself, but how he attached a separate unit model onto another unit model?

And No I dont mean geo-merging because then that would make both unit models into one unit model. No I dont mean attachments either. Reason I want to attach a model is to attach it to the Origin of another unit. Then that unit attached to the origin would be invisible and only viewable by players with a specific ability.

Anyone have any ideas?

Reward: +Rep
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
No I need to use the origin of attachment point.

Explain please; this doesn't make any sense. You need to use the "origin of attachment point"?

The origin of the unit is more or less directly at it's center, at point (0, 0, 0). This point can be referenced simply by combining GetUnitX, GetUnitY, GetUnitFlyHeight, and GetLocationZ - though since all units must be above the terrain you don't really need GetLocationZ so much.

By creating one unit directly on-top of another, you can offset it's position based on the rotation of the "primary" unit to achieve a fixed attachment point.
 
Level 11
Joined
Sep 12, 2008
Messages
657
well.. i guess he wants this:

theres like.. a tank with no turrent model,
the turrent will be added in another way, that is "Attached" to the unit's origin, not as a speical effect.

the attached unit, will have the ability of ghost, and only units will speical ability (true sight) will be able to see that turrent.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Did you not read anything I posted?

The origin of the unit is more or less directly at it's center, at point (0, 0, 0). This point can be referenced simply by combining GetUnitX , GetUnitY , GetUnitFlyHeight , and GetLocationZ - though since all units must be above the terrain you don't really need GetLocationZ so much.

By creating one unit directly on-top of another, you can offset it's position based on the rotation of the "primary" unit to achieve a fixed attachment point.
 
  • Animation - Lock Unit's Head to face Unit, offset by (0.00, 0.00, 90.00)
http://www.wc3c.net/showthread.php?t=105830

might not be the head bone through
try to open the tank model in magos' (war3modeleditor in the toolsection) and go to the node manager and see which bones it has and try to find the right one
any bones which are not called chest or head must be accesed with JASS/Custom Script
 
Level 7
Joined
Jun 8, 2010
Messages
283
This would work, however Im trying to make an invisible attachment point on top of the tank so only allied players can see it.

That trigger requires both tank body and head to be the same model. If i attach a Model on top of the head, it will show the attached model to every player, including enemies.
 
I am pretty sure that illidanxEvil uses that method too, anything else would be very inefficient. Make a dummy unit in front of the tank, and lock body part facing on it. Or alternately, you can do like ham ham, and make a trigger that creates a dummy on the target of every move order, and then add life expiration to it (not sure if it leaks location though) and a second trigger that makes the head face enemies who it is attacking.
Don't know how you should solve the attatchment problem though.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
That trigger requires both tank body and head to be the same model. If i attach a Model on top of the head, it will show the attached model to every player, including enemies.

I suggest just using a periodic timer that updates the position of the "head" tank to the position of the player-controlled "body" tank. If you've got a low enough timer interval, then the transition won't even be visible, it will seem as if the "head" is attached to the "body". Just make sure that you add the ability 'Aloc' to the "head" so it cannot be detected in-game, and for invulnerability and such. You will still be able to kill it when necessary and change its vertex coloring for transparency (or give it an invisibility ability so it is only visible to certain players).
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Not really; the only thing that you need to do on a periodic interval is update its X and Y coordinates, something that really doesn't hinder performance in any noticeable way. I'm sure if you had more than 2000 units (which is not realistic in a Warcraft-type strategy map) it may start causing problems, but it really isn't that big of a deal.
 
Status
Not open for further replies.
Top