Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help [SOLVED] Rotate entity fixed amount of degrees
Reminiscity Offline
Member

Posts: 81
Threads: 16
Joined: Jan 2013
Reputation: 2
#8
RE: Rotate entity fixed amount of degrees

(03-28-2014, 05:52 PM)Mudbill Wrote: Why don't you use SetMoveObjectState and make the entities into MoveObjects? That's what I do, and it works pretty well because you can define in the entity how much "state 1" is. You can input exactly 120 degrees if you'd like. Default is 90 for angular.


Thank you that seems to be the right way to go about this. I changed the open amount to 1.33 to get 120 as state 1. When clicked the wheel spins 120 degrees and then stops. However, when clicked a third time nothing happens. I've tried this (script below) and variations there of but nothing happens.

SetMoveObjectState("area_symbol_1_wheel", GetLocalVarInt("symbol_1_spins") + 1);
AddLocalVarInt("symbol_1_spins", 1);

Edit
It seems like open amount is the maximum number of degrees it can rotate. Which means that I want it to be set to 4 to get a full spin(360 degrees) since 1 is 90 degrees. Then in script do something like this

SetMoveObjectState("area_symbol_1_wheel", GetLocalVarInt("symbol_1_spins") * 0.33);
AddLocalVarInt("symbol_1_spins", 1);

BUT the maximum amount you can input in the open amount field is 2 which is 180 degrees. You can write 4 if you want but it seems like it still will be read as 2. So... wtf xD I feel and wish that I'm making things too complicated or that I'm just too tired atm cuz something like this should be easy imo... rotate prop x amount of degrees along X axis. Fml

My mod Amadeus
(This post was last modified: 03-28-2014, 07:17 PM by Reminiscity.)
03-28-2014, 06:54 PM
Find


Messages In This Thread
RE: Rotate entity fixed amount of degrees - by Reminiscity - 03-28-2014, 06:54 PM



Users browsing this thread: 1 Guest(s)