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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I make a lever that removes an entity?
schmupper Offline
Junior Member

Posts: 23
Threads: 1
Joined: Aug 2011
Reputation: 2
#4
RE: How do I make a lever that removes an entity?

(10-04-2011, 05:25 PM)oscar1007 Wrote:
(10-04-2011, 05:09 PM)schmupper Wrote:
void OnStart()
{
SetEntityConnectionStateChangeCallback("LeverName", "Function");
}


void OnEnter()
{

}

void Function(string &in asEntity, int alState)
{
    if (alState == 1)
    {
    SetEntityActive("EntityName", false);
          return;
    }
void OnLeave()
{

}

That should work.
Thank you! it works now. but you forgot a "}" for ending the function. just sayin! Wink
Great! Smile

Ah Ctrl+C/Ctrl+V can be your worst enemy in this business Smile

''Oh. My. God. He's DEAD. Quickly, if he hasnt started to smell, give him the kiss of life!''

Clarence - The monkey hater
10-04-2011, 05:31 PM
Find


Messages In This Thread
RE: How do I make a lever that removes an entity? - by schmupper - 10-04-2011, 05:31 PM



Users browsing this thread: 1 Guest(s)