Frictional Games Forum (read-only)
make valve have no turn stuck point? help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: make valve have no turn stuck point? help (/thread-18207.html)



make valve have no turn stuck point? help - bjaffedj - 09-08-2012

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


RE: make valve have no turn stuck point? help - EXAWOLT - 09-08-2012

SetPropObjectStuckState(string& asName, int alState);

asName - internal name

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

abEffects - use effects


RE: make valve have no turn stuck point? help - Theforgot3n1 - 09-08-2012

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?


RE: make valve have no turn stuck point? help - bjaffedj - 09-09-2012

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


RE: make valve have no turn stuck point? help - bjaffedj - 09-09-2012

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


RE: make valve have no turn stuck point? help - Apjjm - 09-09-2012

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.


RE: make valve have no turn stuck point? help - bjaffedj - 09-09-2012

thanks man! it worked perfectly! do you have any suggestions on how to make the wheel spin itself?


RE: make valve have no turn stuck point? help - Apjjm - 09-09-2012

You can try SetWheelAngle("Wheel", [NUMBER], true) I suppose, but it won't spin whilst the player is holding the wheel.


RE: make valve have no turn stuck point? help - bjaffedj - 09-09-2012

thanks for reply. but sadly that only spins a wheel to a certain point and not continuesly