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
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#24
RE: Setting up the elevator machine

Just forget about FG's script and focus on building your own. Believe me, it's easier because you'll know precisely what's going.

I actually forgot about the coal lever. Instead of the elevator lever, the coal lever should check if the "Coal" variable is equal to 3.

Modify it like so:

PHP Code: (Select All)
void PullCoalLever(string &in asEntityint alState)

{
   if(
alState == 1//Executed if the lever is pulled
   
{
       if(
GetLocalVarInt("Coal") == 3)) //Checks to see if all coal is inside
       

         
AddLocalVarInt("LeverOn"1); //This is what we'll check when we pull the elevator starting lever
        
}
    }


Ok, now the elevator lever will check if LeverOn is equal to 1.

PHP Code: (Select All)
void ElevatorStartFunction(parameters)
{
   if(
alState == 1//Executed if the lever is pulled
   
{
     
      
//If it is pulled, checks if repairs are complete
      
if(GetLocalVarInt("LeverOn") == &&  GetLocalVarInt("Cogs") == 3)
      {
         
//This block is executed if everything is complete
         //Run your machine startup routine here
      
}

      else
      {
        
//This block executes if something isn't finished
       
}
   }


That should fix it, given you've declared your callbacks/variables. Unless this isn't the issue you're having. ~.o
(This post was last modified: 05-09-2013, 05:25 PM by Tomato Cat.)
05-09-2013, 05:24 PM
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 Tomato Cat - 05-09-2013, 05:24 PM



Users browsing this thread: 2 Guest(s)