UGX-Mods

Call of Duty: Black Ops 3 => General => Topic started by: overkiller115 on October 31, 2016, 08:35:38 am

Title: Rotating Objects.
Post by: overkiller115 on October 31, 2016, 08:35:38 am
I would love to know how i can make a rotating model. I have the moon excavators and want the bucket ro rotate after i turnon the power etc.
Title: Re: Rotating Objects.
Post by: Dust on October 31, 2016, 12:48:25 pm
Theres 3 different types of rotates you can do. RotateRoll, RotateYaw, and RotatePitch. Experiment with all 3 until you find the one you want, in your script, you can do something like
Code Snippet
Plaintext
model RotateRoll(degrees,time);
where degrees is how many degrees you want it to rotate, and time is how many seconds you want it to take to rotate.
Title: Re: Rotating Objects.
Post by: overkiller115 on October 31, 2016, 10:50:06 pm
Theres 3 different types of rotates you can do. RotateRoll, RotateYaw, and RotatePitch. Experiment with all 3 until you find the one you want, in your script, you can do something like
Code Snippet
Plaintext
model RotateRoll(degrees,time);
where degrees is how many degrees you want it to rotate, and time is how many seconds you want it to take to rotate.
I'm getting an error when i try to compile this. I made tha bucket to a script_model, like doors and gave it targername "ex_bucket" and wrote "ex_bucket RotateRoll(360,45);" im the main function in mapname.gsc. What i'm i doing wrong?
I dont know how the script works yet but i want the "saws" on the excavators to rotare from the start until i die.
Title: Re: Rotating Objects.
Post by: Dust on October 31, 2016, 10:53:08 pm
I'm getting an error when i try to compile this. I made tha bucket to a script_model, like doors and gave it targername "ex_bucket" and wrote "ex_bucket RotateRoll(360,45);" im the main function in mapname.gsc. What i'm i doing wrong?
I dont know how the script works yet but i want the "saws" on the excavators to rotare from the start until i die.

You need to get the ent of the object before telling it to do something.

so before that line put
Code Snippet
Plaintext
ex_bucket = GetEnt("NAME_OF_TARGETNAME","targetname"

Change the NAME_OF_TARGETNAME to the targetname you gave to the object.

If you want it to keep on moving until you game over then do something like

Code Snippet
Plaintext
ex_bucket = GetEnt("NAME_OF_TARGETNAME","targetname"
while(1)
{
ex_bucket RotateRoll(360,1);
ex_bucket WaitTill("move_done")
}

Now what that does is, it moves the bucket in a 360 degree angle every 1 second. You can obviously make it go faster or slower by changing the 1.