Frictional Games Forum (read-only)

Full Version: make valve have no turn stuck point? help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi guys! i am trying to make a valve turn without being stuck at any point, just like in the "La Caza" mod. but i can not seem to get it right. my valve just keeps getting stuck at a specific point. please help if you can and will! Smile
SetPropObjectStuckState(string& asName, int alState);

asName - internal name

alState - 0 = not stuck, 1 = at max, -1 = at min

abEffects - use effects
Can you give some background on what the valve is for, so we can help you script your puzzle? Do you want the wheel to open a door, like in the Control Room, or do you just want it to never end, without any actual input on the game?
i imagine to use the spinning valve to like grind a dagger. i have figured out the dagger part but i have not been able to make the wheel spin continuesly
really? no one know how to turn a stuck point of?

and exawolt: i does not seem to work. it still gets stuck at a specific point
Assuming you want a valve that can spin forever, but is still a "wheel" - Your best bet is making a custom entity, and abusing floating point a little.

Firstly, you are going to want to make a copy of the ".ent" file of the valve/wheel entity you want to be able to spin forever. I'll assume for the moment it is "valve_iron.ent".

You will then want to call your copy something like "valve_iron_infinite.ent", and place this in your custom stories entities folder (or wherever you are storing entities for your CS/FC).

The next step is to open up the "valve_iron_infinite" entity file in notepad (or your text / xml editor of choice) - we must edit the xml data in a text editor as the model editor doesn't permit us to do what we are about to do. You then want to find the lines that say:
Code:
<Var Name="MinLimit" Value="-180" />
<Var Name="MaxLimit" Value="180" />
If you are using a different entity the values might be different. We now simply change this to:
Code:
<Var Name="MinLimit" Value="-INF" />
<Var Name="MaxLimit" Value="INF" />
And save the entity file. You can then place it in your map and it should spin forever (or a very very long time). I can't say for certain that this will be side-effect free, but it seemed to work OK for me when I was testing it.
thanks man! it worked perfectly! do you have any suggestions on how to make the wheel spin itself?
You can try SetWheelAngle("Wheel", [NUMBER], true) I suppose, but it won't spin whilst the player is holding the wheel.
thanks for reply. but sadly that only spins a wheel to a certain point and not continuesly