Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Jan 2018
Location: Arkansas, USA
D
stranger
OP Offline
stranger
D
Joined: Jan 2018
Location: 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!

Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
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).

Joined: Jan 2018
Location: Arkansas, USA
D
stranger
OP Offline
stranger
D
Joined: Jan 2018
Location: 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.

Joined: Jan 2018
Location: Brazil
B
stranger
Offline
stranger
B
Joined: Jan 2018
Location: 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


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5