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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotating cogs bugging like mad
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Rotating cogs bugging like mad

As for them not appearing in game, try deleting any MAP_CACHE files. They can cause many bugs and prevent updates in the level editor from appearing in game. The map cache file can be found in the same folder as your map and hps files.

As for the Scripting portion, it definitely needs some work. RotatePropToSpeed is a simple function once you understand each part of it. Since I don't have the map file, I cannot be sure which axis to apply the rotation to.

RotatePropToSpeed(string& asName, float afAcc, float afGoalSpeed, float afAxisX, float afAxisY, float afAxisZ, bool abResetSpeed, string& asOffsetArea);

asName = "NAMEOFCOG"

afAcc = Acceleration (1.0f is fine)

afGoalSpeed = The full speed it will rotate after initial acceleration (1.0f is fine)

afAxis X/Y/Z = The axis it will rotate on.

abResetSpeed = Resets the speed after goal speed is reached (I honestly see no use for this, false is fine)

asOffsetArea = The area the entity will rotate around. Leaving it blank ("") is fine for cogs, so they will rotate around the center of themselves.



In the end, it should look something like this:

RotatePropToSpeed("NAMEOFCOG", 1, 1, 0, 0, 0, false, ""); ///you shouldn't use any value over 1.


For the 0's, replace one of them with either a positive or negative 1 (positive/negative change the direction they spin on the axis i.e. left/right). The rotation of the axis is directly connected to its rotation in the level editor (i.e. x=x, y=y, z=z), so that shouldn't be a problem; worst case scenario, reload the map using each different axis, you'll get the right one pretty quickly.

Hope that helped.

I rate it 3 memes.
07-01-2012, 03:36 PM
Find


Messages In This Thread
Rotating cogs bugging like mad - by ApeCake - 07-01-2012, 03:09 PM
RE: Rotating cogs bugging like mad - by Adny - 07-01-2012, 03:36 PM
RE: Rotating cogs bugging like mad - by ApeCake - 07-01-2012, 04:17 PM
RE: Rotating cogs bugging like mad - by Datguy5 - 07-01-2012, 04:36 PM
RE: Rotating cogs bugging like mad - by Damascus - 07-01-2012, 05:30 PM
RE: Rotating cogs bugging like mad - by ApeCake - 07-01-2012, 08:49 PM
RE: Rotating cogs bugging like mad - by Adny - 07-01-2012, 09:19 PM
RE: Rotating cogs bugging like mad - by ApeCake - 07-01-2012, 09:55 PM



Users browsing this thread: 1 Guest(s)