Frictional Games Forum (read-only)

Full Version: How do I make a lever that removes an entity?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Code:
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.
(10-04-2011, 05:09 PM)schmupper Wrote: [ -> ]
Code:
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
(10-04-2011, 05:25 PM)oscar1007 Wrote: [ -> ]
(10-04-2011, 05:09 PM)schmupper Wrote: [ -> ]
Code:
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
(10-04-2011, 05:31 PM)schmupper Wrote: [ -> ]
(10-04-2011, 05:25 PM)oscar1007 Wrote: [ -> ]
(10-04-2011, 05:09 PM)schmupper Wrote: [ -> ]
Code:
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

(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

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


Code:
void GiveSanityBoost();
void GiveSanityBoostSmall();
Thanks!