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
Multiple Issues Help Setting up the elevator machine
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#15
RE: Setting up the elevator machine

CODE 1
void OnStart()

{

SetEntityConnectionStateChangeCallback("coal_lever", "BurnerFail");

}

void BurnerFail(string &in asEntity, int alState)
{
    if(alState == 1) //1 up, -1 down, 0 between
        {
               if(GetLocalVarInt("Coal") < 3)
           {
           SetMessage("Messages", "BurnerNotReady", 0);
               }

              else
              {
               //Put command here... (Delete the else part if you already had another parameter for the success coal part.
              }
        }
}

CODE 2
void CheckCoalCount()
{
if(GetLocalVarInt("Coal") == 3)
{
SetMessage("Messages", "BurnerReady", 0);
PlaySoundAtEntity("BurnerSound", "general_fire_burning", "AreaBurnerParticle", 1, true);
CreateParticleSystemAtEntity("Fire", "ps_fire_stove_small.ps", "AreaBurnerParticle", true);
//Put the CPSAT and the PSAT on the machinery lever part.
}

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-09-2013, 03:47 AM
Find


Messages In This Thread
Setting up the elevator machine - by serbusfish - 05-07-2013, 01:30 AM
RE: Setting up the elevator machine - by Rapture - 05-07-2013, 03:09 AM
RE: Setting up the elevator machine - by PutraenusAlivius - 05-09-2013, 03:47 AM



Users browsing this thread: 1 Guest(s)