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
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#25
RE: Setting up the elevator machine

(05-09-2013, 05:24 PM)Tomato Cat Wrote: 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

Yes you're right, I wanted to stick with it because apart from that one little detail it works as intended.

I will strip it out and build my own, hopefully I will get it working ok Tongue

05-09-2013, 05:59 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 serbusfish - 05-09-2013, 05:59 PM



Users browsing this thread: 1 Guest(s)