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

turn object help

broken avatar :(
Created 10 years ago
by cricco98
0 Members and 1 Guest are viewing this topic.
2,493 views
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 November 2013
Last active: 4 years ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
cricco98's Groups
cricco98's Contact & Social Linkshttps://www.facebook.com/http://steamcommunity.comhttps://www.youtube.com/u
I know how to give a tutorial on how to turn an object?
broken avatar :(
×
broken avatar :(
The Voice in your Eyes
Location: deBavaria
Date Registered: 26 June 2013
Last active: 2 years ago
Posts
830
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Breton boys do what Breton boys do.
×
Alerion's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Are you referring to the radiant?
Or are you trying to rotate sth. via script?
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 November 2013
Last active: 4 years ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
My Contact & Social Links
More
×
cricco98's Groups
cricco98's Contact & Social Linkshttps://www.facebook.com/http://steamcommunity.comhttps://www.youtube.com/u
by radiant and the script
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
http://www.zeroy.com/script/motion/rotateroll.htm
http://www.zeroy.com/script/motion/rotatepitch.htm
http://www.zeroy.com/script/motion/rotateyaw.htm

those are the functions that rotate an entity. to make your object rotatable, give it a targetname and then put this in the script:

Code Snippet
Plaintext
var = getent("YOUR TARGETNAME HERE","targetname");
angle = #; // replace # with the angle that you want it to rotate to
time = ##; // replace ## with the amount of time it takes to complete the rotate
var RotateRoll(angle,time);
var RotateYaw(angle,time);
var RotatePitch(angle,time);
// each of these lines ^ makes it rotate on a different axis, so experiment so you know which one you want and either delete or comment out the other lines

to make it rotate endlessly:
Code Snippet
Plaintext
for(;;){
var = getent("YOUR TARGETNAME HERE","targetname");
angle = #; // replace # with the angle that you want it to rotate to
time = ##; // replace ## with the amount of time it takes to complete the rotate
var RotateRoll(angle,time);
var RotateYaw(angle,time);
var RotatePitch(angle,time);
// each of these lines ^ makes it rotate on a different axis, so experiment so you know which one you want and either delete or comment out the other lines
wait(.05);
}

remember to put these in a function ( either new or existing ). This would work in both zombiemode.gsc and mapname.gsc
Last Edit: August 24, 2014, 07:04:59 pm by n123q45
broken avatar :(
×
broken avatar :(
RadihaX
Location: caCanada
Date Registered: 2 September 2012
Last active: 3 years ago
Posts
978
Respect
Forum Rank
The Decider
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
Signature
Overrun
Lockdown
Overrun (Black Ops Mod)
Snowglobe
Leviathan
Abandoned School
Ski Resort
Leviathan Redux
×
JBird632's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
JBird632's Contact & Social LinksJBird632JBird632JBird632JBird632JBird632Mapper
He would get an infinite loop error if he did that, add a wait with the amount of time.
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
He would get an infinite loop error if he did that, add a wait with the amount of time.
Not just that it's poorly scripted.

Code Snippet
Plaintext
RotateObject(entity_targetname, angles, degree, time)
{
thing_to_move = GetEnt(entity_targetname, "targetname");
//You can also use getEntArray if you're doing multiple entities of the same targetname. (Have to do that or else you'll get an error with getEnt.)
//Rotate functions consists of: RotatePitch, RotateRoll, RotateTo, RotateVeolcity, RotateYaw
//So if I wanted to move it lets say up I wold do....
if( isDefined(degree) )
{
thing_to_move RotatePitch(degree, time);
thing_to_move waittill("rotatedone");
}
else if( IsDefined(angles) )
{
thing_to_move RotateTo( angles, time );
thing_to_move waittill("rotatedone");
}
//rotatedone is an automatic notify of Rotate(Function)
//then you'd do something else inbetween, seems easy enough?
        //Look into a couple of Script References on all the parameters and specific function details on each Rotate function.
}
Last Edit: August 24, 2014, 06:20:20 pm by DidUknowiPwn
broken avatar :(
  • n123q45
  • Deleted Member
×
broken avatar :(
n123q45
This user is deleted :(
He would get an infinite loop error if he did that, add a wait with the amount of time.
lel forgot that since i never get that error... fixed

 
Loading ...