Larian Banner
Previous Thread
Next Thread
Print Thread
Rotating an Object By Scripting #641039
21/01/18 11:03 PM
21/01/18 11:03 PM
Joined: Jan 2018
Posts: 3
Arkansas, USA
D
Daddy Bowser Offline OP
stranger
Daddy Bowser  Offline OP
stranger
D

Joined: Jan 2018
Posts: 3
Arkansas, USA
I tried looking for preexisting scripts that rotated an object but I couldn't seem to find any. I remembered the particular statue on Reaper's Coast in the Graveyard that would rotate at about 45 degree angles after each time you selected that dialog option, but I couldn't figure out how the statue was actually turned. I'm kind of new to scripting, I saw there was a GetRotation event you could use for an item but nothing about setting or changing it's rotation, unless I'm missing something obvious. Any ideas or suggestions?

Thanks!

Re: Rotating an Object By Scripting [Re: Daddy Bowser] #641051
22/01/18 12:25 PM
22/01/18 12:25 PM
Joined: Nov 2017
Posts: 129
L
LarIlya Offline
member
LarIlya  Offline
member
L

Joined: Nov 2017
Posts: 129
You can use ItemRotateY and ItemRotateToAngleY in Story to rotate objects.

There's a Y because the item is rotated around the Y axis (the vertical one).

Re: Rotating an Object By Scripting [Re: Daddy Bowser] #641182
25/01/18 06:06 AM
25/01/18 06:06 AM
Joined: Jan 2018
Posts: 3
Arkansas, USA
D
Daddy Bowser Offline OP
stranger
Daddy Bowser  Offline OP
stranger
D

Joined: Jan 2018
Posts: 3
Arkansas, USA
Thanks for the response! I actually haven't even touched the Story scripting yet. I managed to find how they did the statue quest since I knew where to look now, but I haven't been able to figure out how to make an object turn automatically at a constant rate, or at least on some kind of pressure plate toggle instead of through a dialogue option. My only experience so far with scripting has been door switches and fireball traps lol.

Re: Rotating an Object By Scripting [Re: Daddy Bowser] #641379
28/01/18 08:57 PM
28/01/18 08:57 PM
Joined: Jan 2018
Posts: 23
Brazil
B
BloodyWorth Offline
stranger
BloodyWorth  Offline
stranger
B

Joined: Jan 2018
Posts: 23
Brazil
If you use the rotate call, the item will automatically lerp("animate") the rotation, so it will be smooth, if you want it just to be instant you can use ItemToTransform


Moderated by  Larian_Koala 

Powered by UBB.threads™ PHP Forum Software 7.6.2