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

Rotate something via scripting?

broken avatar :(
Created 7 years ago
by Erthrock
0 Members and 1 Guest are viewing this topic.
2,107 views
broken avatar :(
×
broken avatar :(
Location: usGarrett, IN
Date Registered: 4 May 2014
Last active: 5 years ago
Posts
164
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
The world will always underestimate me...until i show them what my creativity is capable of.
×
Erthrock's Groups
hi im trying to have my hanging body rotate slowly on the x axis, while staying in the same spot, counter clockwise then slowly reverse to clockwise.
can someone help me?
broken avatar :(
×
broken avatar :(
Location: nzChristchurch
Date Registered: 8 June 2014
Last active: 6 years ago
Posts
77
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Can I do this?
Signature
×
IDontEvenKnow's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Code Snippet
Plaintext
TurnyThingy = GetEnt(<your taget name>,"targetname"
TurnyThing .angles= (X,Y,Z)

something like that threaded in a while only adjusting the angles. Note this is a very rough pseudo code.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I think Recktfullies's rising water tutorial may be the solution if you only want your body to rotate on an axis : http://ugx-mods.com/forum/index.php/topic,13844.0.html

I'm looking for a better way to do this, a way that would alow us to shoot the body and make it swing (like on the BO3 custom map Halloween Zombie).
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
There are a few rotation functions depending on the axis of your script_model

Code Snippet
Plaintext
ent RotateRoll(<roll angle>,<time>,[acceleration time],[deceleration time])
ent RotatePitch(<pitch angle>,<time>,[acceleration time],[deceleration time])
ent RotateYaw(<yaw angle>,<time>,[acceleration time],[deceleration time])
ent RotateTo(<angles>,<time>,[acceleration time],[deceleration time])

adding a wait in between each rotation will allow the ent to rotate to its position before rotating back.
For example:
Code Snippet
Plaintext
//ents = GetEntArray("swayme","targetname");
// array::thread_all(ents, &Sway);
function Sway(){
while(1){
self RotateRoll(90,1,.1,.1);
wait(.9);
self RotateRoll(-90,1,.1,.1);
wait(.9);
}
}
Last Edit: November 07, 2016, 03:09:38 pm by MakeCents

 
Loading ...