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

I did it! Well, almost.

Using the scripts you guys provided plus a tiny bit of stealing from Frictionals script (Angel) I have managed to make the machine require 3 pieces of coal + 3 cog wheels, and the cog wheels turn when the machine starts as well as giving sanity boost, play happy music, etc.

However, I have noticed there are still a couple of tiny flaws. First of all basically once 3 coals have been placed in the burner the machine will work, even when you havent pulled the lever to make the burner burn the coal. Obviously this isnt ideal, I want the player to have to pull the handle to start the burner before it will work.

Second problem, ive made it so when you interact with the lever it displays the message saying the machine doesnt have enough coal. Trouble is this message pops up when you spawn into the level for some reason.

void OnStart()

{

SetEntityConnectionStateChangeCallback("coal_lever", "BurnerFail");

}

void BurnerFail(string &in asEntity, int alState)
{
    if(GetLocalVarInt("Coal") < 3)
    {
        SetMessage("Messages", "BurnerNotReady", 0);
    }
}

I have no idea why its doing that?

And my final problem is the burner effects start up as soon as the third piece of coal is placed in the burner, of course i know why this happens im just not really sure how to make this happen with the lever instead?

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);
    }

(This post was last modified: 05-09-2013, 03:35 AM by serbusfish.)
05-09-2013, 03:28 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 serbusfish - 05-09-2013, 03:28 AM



Users browsing this thread: 1 Guest(s)