Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / can an entity rotate to original position after being rotated?

Author
Message
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 19th Jul 2009 17:12
Hi everyone,
can an entity rotate to original position after being rotated?
to be more clearer say the entity is looking north by default, by scripting it rotated to player.. so is there any command to rotate it back to it's original position?
TY..

Lewis
VBOTB Developer '10
19
Years of Service
User Offline
Joined: 16th Mar 2005
Location: Queensland, Australia
Posted: 19th Jul 2009 19:21
You could make an invisible entity in the distance where the entity would be looking, and then have entity set that entity as its target. Then, you could make the entity rotate to that target, thus making it look back to the position.
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 19th Jul 2009 20:44 Edited at: 19th Jul 2009 20:45
That's a bit of hassle to set up right though. If you're using a mod that has Ply's mod integrated in it, like PBUM, you can do the following.

You have to set a variable to the entity's y angle before you rotate it to the player, and when you want it to rotate back, rotate the entity on its y-axis back the way it was using the saved value in the variable.

example code:

note:I'm not sure about the "EAY$" part, you'll have to look in the Ply's Mod manual.

Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 19th Jul 2009 22:07
all great ideas ty..

Login to post a reply

Server time is: 2024-11-25 03:47:11
Your offset time is: 2024-11-25 03:47:11