Frictional Games Forum (read-only)
[SCRIPT] AddLocalVarInt and valves problems - 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: [SCRIPT] AddLocalVarInt and valves problems (/thread-13361.html)

Pages: 1 2


RE: AddLocalVarInt and valves problems - jens - 02-16-2012

If you move AddLocalVarInt("Valve", 1); to be located outside the for loop but inside the alState == 1 section it should work fine.

It's always good to use the AddDebugMessage extensively when scripting, it will save you a lot of time, if you had done
a AddDebugMessage("Valve value: "+GetLocalVarInt("Valve), false); you would instantly see that the value is not what you think it should be, or if it has no value you would know it did not get triggered.



RE: AddLocalVarInt and valves problems - SilentStriker - 02-16-2012

(02-16-2012, 11:41 AM)jens Wrote: If you move AddLocalVarInt("Valve", 1); to be located outside the for loop but inside the alState == 1 section it should work fine.

It's always good to use the AddDebugMessage extensively when scripting, it will save you a lot of time, if you had done
a AddDebugMessage("Valve value: "+GetLocalVarInt("Valve), false); you would instantly see that the value is not what you think it should be, or if it has no value you would know it did not get triggered.
Thanks for the help Jens Smile I will try it when I get home Smile

Det funkade! Tack så hemskt mycket Jens! :]

It worked! Thank you so much Jens! Big Grin