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

Placement Model with Attachments

Status
Not open for further replies.
Given how models/placement models/portraits are assigned to a unit, I've been unable to give a building that is composed of multiple attachments its own placement model with attachments. Is there a way to do this aside from 3D editing?

If it help to clarify my query, I'll post an example image later when I'm back home.

EDIT:

full


Currently, while placing the model, I can't select this model combination as the placement model since in the field that governs this you may only choose one model, not an actor. I also can't seem to find other relevant events that tell the game to create those attachment 'on placement' or somthing like that.
 
Last edited:
Alright, copied the building over to a test map. It seems to duplicate the actors when it finishes construction (no idea what's up with that) but it should be a viable testing ground. I'd also be intrigued to see how to add birth and death animations since I haven't gotten to trying those yet.

The model also seems to levitate sometimes. I initially used the Invisible Model to bypass this, but it seems to be happening anyway :(
 

Attachments

  • PlacementModelWithAttachments.SC2Map
    12.9 KB · Views: 93

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
It seems to duplicate the actors when it finishes construction (no idea what's up with that) but it should be a viable testing ground.
The unit actor is created twice. Once when the foundation starts being built and again once construction is completed. As such it creates all attachment actors twice. Since the unit actor is removed and immediately replaced when construction finished, the attached model actors do not get orphaned and so do not get removed. End result is each model actor attachment is created twice per unit.

One solution is to prevent two of the same model attachment actor existing at the same time. This is done by using a term for creation that checks the scope for the existence of the actor that will be created and fails if it exists. This needs XML view to manually insert a ! before the term so it is negated. If the actor exists inside the scope the term fails then the actor does not get created again.

Another solution is to remove the events that destroy the actor upon construction finish. That way the same actor can exist from start until death. Since the actor is only created once, all attachments will only be created once.

I have had no luck getting the foundation targeting to work. Still nothing when trying to place it.
 
Status
Not open for further replies.
Top