Frictional Games Forum (read-only)
using a lever on the mount. - 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: using a lever on the mount. (/thread-19987.html)



using a lever on the mount. - stokesie95 - 01-19-2013

im trying to use the handle from the lever and then use it on the mount to make it complete. but i cant seem to get it to work. the names are matching and i am using both "AddUseItemCallback" and "AddEntityCollideCallback". niether are working and i have tried using a script area to interact with and still nothing

any suggestions?[/align]


RE: using a lever on the mount. - The chaser - 01-19-2013

It's really easy:

Put the lever without mount anywhere in your map and just the mount where you need it. Make a script area that fits the mount. Then;

Code:
void OnStart()
{
AddEntityCollideCallback("Lever_without_mount", "Script_area_mount", "Mount", true, 1);
}

void Mount (string &in asParent, string &in asChild ,int alState)
{
SetEntityActive("Lever_mounted", true); //This entity is the normal lever
SetEntityActive("Lever_mount", false); //Mount of the lever
SetEntityActive("Lever_without_mount", false);
}



RE: using a lever on the mount. - stokesie95 - 01-19-2013

(01-19-2013, 10:02 PM)The chaser Wrote: It's really easy:

Put the lever without mount anywhere in your map and just the mount where you need it. Make a script area that fits the mount. Then;

Code:
void OnStart()
{
AddEntityCollideCallback("Lever_without_mount", "Script_area_mount", "Mount", true, 1);
}

void Mount (string &in asParent, string &in asChild ,int alState)
{
SetEntityActive("Lever_mounted", true); //This entity is the normal lever
SetEntityActive("Lever_mount", false); //Mount of the lever
SetEntityActive("Lever_without_mount", false);
}
sorry, found the problem before checking back here. thanks though