Frictional Games Forum (read-only)
ladder script 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: ladder script help (/thread-16884.html)

Pages: 1 2


RE: ladder script help - HoyChampoy - 07-12-2012

(07-12-2012, 01:17 AM)Your Computer Wrote:
(07-12-2012, 12:14 AM)HoyChampoy Wrote: For the string asName do I put the name of the ladder or the name of the valve?

Name of the valve.

(07-12-2012, 12:14 AM)HoyChampoy Wrote: and lets say for the asCallback, if i named it activateladderarea, would i put SetEntityActive in there?

Yes.

(07-12-2012, 12:14 AM)HoyChampoy Wrote: like this:

You need to make use of alState if you want to make the ladder area active only when the valve is fully turned towards a certain direction.
Got it to work Smile


SetEntityConnectionStateChangeCallback("valve_iron_rusty_1", "ladderarea");


void activateladderarea(string &in asEntity, int alState)
{
SetMultiSliderCallback("valve_iron_rusty_1", "ladderarea");
}

void ladderarea(string &in asEntity, int alState)
{
if(alState == 1)
{

SetEntityActive("LadderArea_1", true);

}

}