Rotating Objects.

broken avatar :(
Created 1420 days ago
by overkiller115
0 Members and 1 Guest are viewing this topic.
1,873 views
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 25 March 2016
Last active: 1207 days ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
overkiller115's Groups
overkiller115's Contact & Social Links
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.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 75 days ago
Posts
2,152
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. [You are not allowed to view external links. Register or Login to see them]
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
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
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.
Last Edit: October 31, 2016, 12:48:53 pm by Dust
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 25 March 2016
Last active: 1207 days ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
overkiller115's Groups
overkiller115's Contact & Social Links
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
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.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 75 days ago
Posts
2,152
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
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
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

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.

Last Edit: October 31, 2016, 10:57:05 pm by Dust

 

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
Loading ...