oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
How do I make a lever that removes an entity?
Like the title says, How do I make a lever that removes an entity?
Fast replies are much appreciated!
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.
Anyone?
(This post was last modified: 10-04-2011, 05:06 PM by oscar1007.)
|
|
10-04-2011, 04:25 PM |
|
schmupper
Junior Member
Posts: 23
Threads: 1
Joined: Aug 2011
Reputation:
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 |
|
oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
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!
|
|
10-04-2011, 05:25 PM |
|
schmupper
Junior Member
Posts: 23
Threads: 1
Joined: Aug 2011
Reputation:
2
|
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! Great!
Ah Ctrl+C/Ctrl+V can be your worst enemy in this business
''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 |
|
oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
RE: How do I make a lever that removes an entity?
|
|
10-04-2011, 05:49 PM |
|
schmupper
Junior Member
Posts: 23
Threads: 1
Joined: Aug 2011
Reputation:
2
|
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! No idea 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 |
|
Mehis
Member
Posts: 184
Threads: 10
Joined: Sep 2011
Reputation:
4
|
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 |
|
oscar1007
Member
Posts: 64
Threads: 24
Joined: Oct 2011
Reputation:
0
|
RE: How do I make a lever that removes an entity?
Thanks!
|
|
10-04-2011, 06:22 PM |
|
|