The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Elevator problems
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#1
Elevator problems

Hey Forum people!

Earlier today, I was trying out my elevator. It's only supposed to start going upwards before the screen fades out, so as far as controlling the elevator it should be easy.

I have used the default elevator room from Amnesia, and put a piston underneath it. The piston should be triggered when I push down my elevator lever (which works!).

Here is a sample of my code:


void OnStart()
{
SetEntityInteractionDisabled("Entity_Elevator", true);
SetPropStaticPhysics("Entity_Elevator", false);
SetEntityConnectionStateChangeCallback("elevator_lever_1", "func_drop");

}


void func_drop(string &in asEntity, int alState)
{
SetEntityInteractionDisabled("elevator_lever_1", true);
SetPropStaticPhysics("elevator_lever_1", true);
AddDebugMessage("func_drop is running for relz.", true);
GiveSanityBoost();
AddTimer("", 2.0f, "Play_Sound");
PlaySoundAtEntity("", "quest_completed.snt", "elevator_lever_1", 0, false);
}

void Play_Sound(string &in asTimer)
{
PlaySoundAtEntity("", "crank_old_move.snt", "elevator_lever_1", 0, false);
SetMoveObjectStateExt("control_room_piston_piston_1", 0.6, 0.6, 8, 0, false);
}


Anyone have any suggestions? I already tried to understand Elvens elevator tutorial, but my piston is going right through my elevator room!

All the best,
//Twitchez
05-18-2012, 01:38 PM
Find


Messages In This Thread
Elevator problems - by Twitchez - 05-18-2012, 01:38 PM
RE: Elevator problems - by Putmalk - 05-18-2012, 02:02 PM
RE: Elevator problems - by Twitchez - 05-18-2012, 02:22 PM
RE: Elevator problems - by Rapture - 05-18-2012, 02:53 PM
RE: Elevator problems - by Putmalk - 05-18-2012, 02:57 PM
RE: Elevator problems - by Rapture - 05-18-2012, 03:00 PM
RE: Elevator problems - by Putmalk - 05-18-2012, 03:23 PM
RE: Elevator problems - by Rapture - 05-18-2012, 03:31 PM
RE: Elevator problems - by Twitchez - 05-18-2012, 05:05 PM
RE: Elevator problems - by Rapture - 05-18-2012, 05:30 PM



Users browsing this thread: 2 Guest(s)