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
#22
RE: Setting up the elevator machine

I'm just about ready to cry at this!

The main problem im facing is if I move frictional's part of the script to the onstart section it throws up errors and wont load, but leaving it where it is means your solutions cant be implemented (unless im doing it wrong?).

void PullStartLever(string &in asEntity, int alState)
{
if(alState == -1) AddDebugMessage("Lever Min", false);
else if (alState == 1) StartMachine(asEntity);
}
/*If all settings correct start the machine, if not do a hickup start
*/
void StartMachine(string sEntity)
{
PlaySoundAtEntity("s1"+sEntity, "13_ignite", sEntity, 0.2f, false);
PlaySoundAtEntity("s2"+sEntity, "13_machine_fail", sEntity, 0.2f, false);

if(GetLocalVarInt("WheelOK") == 3 && GetLocalVarInt("Coal") == 3)

PullStartLever in this case is linked to the main machine lever, when it is pulled it does the Var checks, somewhere in here I need another check for the other lever. Perhaps im missing something obvious but I just cant get it working. I tried adding this before the PullStartLever command:

void PullCoalLever(string &in asEntity, int alState)

{
if(alState == 1) AddLocalVarInt("LeverOn", 1);
}

but this just stops the machine from starting even if the burner is running. I guess in this case im using the AddLocalVarInt command wrong?

05-09-2013, 04:37 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, 04:37 PM



Users browsing this thread: 1 Guest(s)