Frictional Games Forum (read-only)

Full Version: Make a lever move an object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if you could make a lever move for example a bookshelf or other entity? I´ve looked around but cant rly find an answer so does anyone have a script for this or could someone atleast point me in the right direction?
If player is not there when the object should move, you could just add fitting sound effect and activate entity and deactivate other.
Code:
SetEntityActive(string& asName, bool abActive);
(11-04-2010, 03:16 PM)anzki Wrote: [ -> ]If player is not there when the object should move, you could just add fitting sound effect and activate entity and deactivate other.
Code:
SetEntityActive(string& asName, bool abActive);

That sounds smart but since i am a total noob at scripting could you show me how that script would look?
Code:
void WhateverFunctionYouUseWithTheLever(WhatEverBelongsHere)
{
SetEntityActive("EntityName1", false);
SetEntityActive("EntityName2", true);
}
-EntityName1 is the name of the entity that is active from the start, and is going to dissapear.
-EntityName2 is name of the entity that is inactive from the star, and is going to be activated.
-You can set entity inactive by checking "Inactive" checkbox in level editor.