UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How to make door with multiple parts move together?

broken avatar :(
Created 10 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
1,521 views
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
So I have a door that was made from several brushes, I converted a bunch of them into a model (couldn't do all of it because it didn't keep the proper UVs when I exported it to Maya) so I have a door which uses 4 script_brushmodels and 1 script_model.

When I open the door in game, the parts move separately; so the brushes move about half a second before the script_model for instance and it looks kinda weird. Is there any way to make them all move simultaneously so they look like one entity?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Constants and Variables
Location: us
Date Registered: 18 August 2013
Last active: 2 years ago
Posts
889
Respect
Forum Rank
The Decider
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
The Worst Secret Agent Ever
Signature
×
MAK911's Groups
Box Mappers Elite
Box Mappers Elite
Banned Elite
Banned Elite
MAK911's Contact & Social Linksmkramrtmkramrt
Send to me becuz I is bored and feel like uving.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Simpest way is to probably make the "door" the model. Then seperately get the brushes and linkto the model. Then when the model moves, door opens, the brushes will to. You could set the target of the pieces to the targetname of the model/door. Something like this could be used to link one.

Code Snippet
Plaintext
MyDoorPiece(){
pieces = GetEntArray( "mypiece","targetname" );
for( i=0;i<pieces.size;i++ ){
door = GetEnt( self.target,"targetname" );
pieces[i] linkto(door);
}
}


This would work easily in one situation, but if you were going to repeat this type of thing often, I would prob modify the way your blockers_new script works instead, and set the brushes as the target of the door/model, and add an extra script to link those to the model there instead.
Last Edit: July 09, 2016, 09:30:09 pm by MakeCents
Marked as best answer by Deleted User 7 months ago
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
Simpest way is to probably make the "door" the model. Then seperately get the brushes and linkto the model. Then when the model moves, door opens, the brushes will to. You could set the target of the pieces to the targetname of the model/door. Something like this could be used to link one.

Code Snippet
Plaintext
MyDoorPiece(){
pieces = GetEntArray( "mypiece","targetname" );
for( i=0;i<pieces.size;i++ ){
door = GetEnt( self.target,"targetname" );
pieces[i] linkto(door);
}
}


This would work easily in one situation, but if you were going to repeat this type of thing often, I would prob modify the way your blockers_new script works instead, and set the brushes as the target of the door/model, and add an extra script to link those to the model there instead.

I'll just mark this best answer but I ended up UVing the model myself so it's all one model now and works perfectly (as I wanted it originally) and saves ents too.

 
Loading ...