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?
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#1
How do I make a lever that removes an entity?

Like the title says, How do I make a lever that removes an entity? Huh
Fast replies are much appreciated! Smile

Thanks!
please someone?
Im jusing it so i can remove knights that's blocking a way. so when you pull the lever they will disappear. Smile
Anyone? Huh

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 10-04-2011, 05:06 PM by oscar1007.)
10-04-2011, 04:25 PM
Find
schmupper Offline
Junior Member

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

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.

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

Clarence - The monkey hater
(This post was last modified: 10-04-2011, 05:09 PM by schmupper.)
10-04-2011, 05:09 PM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#3
RE: How do I make a lever that removes an entity?

(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

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
10-04-2011, 05:25 PM
Find
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
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#5
RE: How do I make a lever that removes an entity?

(10-04-2011, 05:31 PM)schmupper Wrote:
(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
And btw, how do i make that blue shiny thing the comes up at the screen when you etc. use sanity potion? thanks again! Big Grin


Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
10-04-2011, 05:49 PM
Find
schmupper Offline
Junior Member

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

(10-04-2011, 05:49 PM)oscar1007 Wrote: And btw, how do i make that blue shiny thing the comes up at the screen when you etc. use sanity potion? thanks again! Big Grin
No idea Sad I always thought that occured by itself?
But if you just mean the very effect... well I guess you should find it in the wiki if it exist http://wiki.frictionalgames.com/hpl2/amn...en_effects

void GiveSanityBoost(); void GiveSanityBoostSmall();
Perhaps one of these?



''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:55 PM
Find
Mehis Offline
Member

Posts: 184
Threads: 10
Joined: Sep 2011
Reputation: 4
#7
RE: How do I make a lever that removes an entity?

void GiveSanityBoost();
void GiveSanityBoostSmall();
(This post was last modified: 10-04-2011, 05:57 PM by Mehis.)
10-04-2011, 05:56 PM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#8
RE: How do I make a lever that removes an entity?

Thanks!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
10-04-2011, 06:22 PM
Find




Users browsing this thread: 1 Guest(s)