Frictional Games Forum (read-only)
[SCRIPT] Putting a lever... - 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] Putting a lever... (/thread-11395.html)



Putting a lever... - sasukeroxxx - 11-17-2011

How do I get a lever and place it in such a place to pull it? for example: pick up the item in leveleditor is called "lever_small_lever" and places it in the item: "level_small_mount" anhelp would be greatly appreciated Big Grin

@edit:
I improvised and put it this way and it worked:
lever_2 the lever is released, level_small_mount_1 is the business that puts the lever.level_3 the lever and is paired with the "mount". thus it was that was what i wanted to do?


Code:
void OnStart(){AddEntityCollideCallback("lever_2", "loke", "oloco", true, 1);}void oloco(string &in asParent, string &in asChild, int alState){   SetEntityActive("lever_small_mount_1", false);      SetEntityActive("lever_2", false);   SetEntityActive("lever_3", true);}