Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 2 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make a lever move an object
Author Message
jockelix Offline
Junior Member

Posts: 6
Joined: Feb 2009
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
anzki Offline
Member

Posts: 88
Joined: Apr 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
jockelix Offline
Junior Member

Posts: 6
Joined: Feb 2009
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
anzki Offline
Member

Posts: 88
Joined: Apr 2010
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: