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
Speed of a spinning wheel?
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#1
Speed of a spinning wheel?

OK, so after a few hours of tinkering I finally managed to accomplish what I was trying to do: a custom entity that can spin. I did it by putting a hing joint into the entity and setting it as a wheel in the user variables. Second thing I wanted to do is make the wheel spin 540 degrees when the player enters a scrip area. Did that by using SetWheelAngle("custom_wheel", 540, true);

It does what I want but the problem is it spins at supersonic speeds. I want it to be much slower and unfortunately that script doesn't seem to account for the speed. I've tried changing "moveMaxSpeed" in the user variables of the entity to a really low number but that doesn't change anything.

Any ideas?

Thanks in advance.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-02-2013, 08:42 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Speed of a spinning wheel?

What you're saying is that when you enter a script area, the wheel will turn 540 degrees? If you're trying to make it turn like it did on the vanilla game (FYI, vanilla game is the original one Wink), i think you're using the wrong perimeter.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-02-2013, 08:45 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#3
RE: Speed of a spinning wheel?

(04-02-2013, 08:45 AM)JustAnotherPlayer Wrote: What you're saying is that when you enter a script area, the wheel will turn 540 degrees?

Yes, this is what I'm trying to do. If by "The way it did in the vanilla game" you mean the whole "clicking on the wheel and spinning your mouse" stuff, that's not what I'm going for (I actually don't want to let the player even interact with the wheel.)

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-02-2013, 08:51 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Speed of a spinning wheel?

(04-02-2013, 08:51 AM)DeAngelo Wrote:
(04-02-2013, 08:45 AM)JustAnotherPlayer Wrote: What you're saying is that when you enter a script area, the wheel will turn 540 degrees?

Yes, this is what I'm trying to do. If by "The way it did in the vanilla game" you mean the whole "clicking on the wheel and spinning your mouse" stuff, that's not what I'm going for (I actually don't want to let the player even interact with the wheel.)
What i meant is that the wheel moves automatically and the player won't be able to interact with it. As you can see in the Machine Room level, the cogs move automatically, never stops and cannot be interacted.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-02-2013, 08:55 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#5
RE: Speed of a spinning wheel?

(04-02-2013, 08:55 AM)JustAnotherPlayer Wrote:
(04-02-2013, 08:51 AM)DeAngelo Wrote:
(04-02-2013, 08:45 AM)JustAnotherPlayer Wrote: What you're saying is that when you enter a script area, the wheel will turn 540 degrees?

Yes, this is what I'm trying to do. If by "The way it did in the vanilla game" you mean the whole "clicking on the wheel and spinning your mouse" stuff, that's not what I'm going for (I actually don't want to let the player even interact with the wheel.)
What i meant is that the wheel moves automatically and the player won't be able to interact with it. As you can see in the Machine Room level, the cogs move automatically, never stops and cannot be interacted.

Yeah, something like that. I was looking at the Water Wheel script in the sewer level and they're using RotatePropToSpeed But I gotta make it only do it 540 degrees instead of continuous.

maybe instead of having it be a wheel, I can make it a static prop, user the rotateproptospeed thing then use a very rigidly timed timer to stop the rotation when it gets to 540.

Only problem is the object is supposed to be inactive until at first and I can't do that with static props. Perhaps I can make a script area right where the prop should be then use the "create prop" script to make it appear then make it spin. I'll mess with all this and see what I can get going.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-02-2013, 09:01 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#6
RE: Speed of a spinning wheel?

(04-02-2013, 09:01 AM)DeAngelo Wrote:
(04-02-2013, 08:55 AM)JustAnotherPlayer Wrote:
(04-02-2013, 08:51 AM)DeAngelo Wrote:
(04-02-2013, 08:45 AM)JustAnotherPlayer Wrote: What you're saying is that when you enter a script area, the wheel will turn 540 degrees?

Yes, this is what I'm trying to do. If by "The way it did in the vanilla game" you mean the whole "clicking on the wheel and spinning your mouse" stuff, that's not what I'm going for (I actually don't want to let the player even interact with the wheel.)
What i meant is that the wheel moves automatically and the player won't be able to interact with it. As you can see in the Machine Room level, the cogs move automatically, never stops and cannot be interacted.

Yeah, something like that. I was looking at the Water Wheel script in the sewer level and they're using RotatePropToSpeed But I gotta make it only do it 540 degrees instead of continuous.

maybe instead of having it be a wheel, I can make it a static prop, user the rotateproptospeed thing then use a very rigidly timed timer to stop the rotation when it gets to 540.

Only problem is the object is supposed to be inactive until at first and I can't do that with static props. Perhaps I can make a script area right where the prop should be then use the "create prop" script to make it appear then make it spin. I'll mess with all this and see what I can get going.

Seriously? It's that easy. Add a sticky area to the place where the cogs will be placed. When it's attached, de-activate the entity and activate the static prop. When it's turned to 540, test how many seconds and placement of it. Then test it out.
EDIT:
Make a script area at the place where the cog is in place, and script it so that when it's attached, it deactivates and the static prop activates.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-02-2013, 09:06 AM by PutraenusAlivius.)
04-02-2013, 09:05 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#7
RE: Speed of a spinning wheel?

Huzzah! Took forever to find the sweetspot on the timer to make the spinning stop at just the right angle, but I got it working. Thanks Smile

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-02-2013, 10:37 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Speed of a spinning wheel?

(04-02-2013, 10:37 AM)DeAngelo Wrote: Huzzah! Took forever to find the sweetspot on the timer to make the spinning stop at just the right angle, but I got it working. Thanks Smile

No problemo. Now i got my own s**t to deal with.

"Veni, vidi, vici."
"I came, I saw, I conquered."
04-03-2013, 06:21 AM
Find




Users browsing this thread: 1 Guest(s)