Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make a lever move an object
jockelix Offline
Junior Member

Posts: 6
Threads: 3
Joined: Feb 2009
Reputation: 0
#1
Make a lever move an object

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?
11-04-2010, 02:37 PM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#2
RE: Make a lever move an object

If player is not there when the object should move, you could just add fitting sound effect and activate entity and deactivate other.
SetEntityActive(string& asName, bool abActive);

[Image: 2qnr5av.png]
11-04-2010, 03:16 PM
Find
jockelix Offline
Junior Member

Posts: 6
Threads: 3
Joined: Feb 2009
Reputation: 0
#3
RE: Make a lever move an object

(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.
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?
11-04-2010, 03:40 PM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#4
RE: Make a lever move an object

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.

[Image: 2qnr5av.png]
11-05-2010, 12:48 PM
Find




Users browsing this thread: 1 Guest(s)