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
Lever help needed
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#1
Question  Lever help needed

Well I think I know a way for how to do what I want to do. but I still need help look I have an lever I want it to open a hatch when you pull it like up and when you pull it down I want it to close again, but My code doesn't seem to work. Huh (I know my code is actually only for opening it)this is my code I hope you guys could help.
void OnStart()
{
InteractConnectPropWithMoveObject("wheeltodoor1", "wheelrust", "GateOpenClose", true, false, 0);
InteractConnectPropWithMoveObject("wheeltodoor1", "wheelrusttwo", "GateOpenClose", true, false, 0);
AddEntityCollideCallback("Player", "Gategoeslocked", "CloseGate", true, 1);
SetEntityPlayerInteractCallback("wheelrustthree", "rustwheel", false);
AddEntityCollideCallback("Lever", "Mount" , "LeverMount", true, 1);
SetEntityConnectionStateChangeCallback("LeverComplete", "leverfunc");
}
void CloseGate(string &in asParent, string &in asChild, int asEntity)
{
SetMoveObjectStateExt("GateOpenClose", 0, 8, 16, 0, false);
CreateParticleSystemAtEntity("", "ps_dust_elevator_crash.ps", "Dust_6", false);
SetEntityActive("wheelrusttwo", false);
SetEntityActive("wheelrustthree", true);
SetWheelInteractionDisablesStuck("wheelrusttwo", false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(10, true);
}
void rustwheel(string &in entity)
{
SetMessage("Messages", "DoorClosed", 0);
}
void LeverMount(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Lever" , false);
SetEntityActive("LeverComplete" , true);
SetEntityActive("Mount", false);
}
void leverfunc(string &in asEntity, int alState)
{
if (alState == 1)
SetSwingDoorLocked("hatch_drainage_1", false, true);
PlaySoundAtEntity("", "unlock_door", "hatch_drainage_1", 0, false);
}
(This post was last modified: 07-04-2012, 09:37 PM by Traggey.)
07-03-2012, 08:57 PM
Find


Messages In This Thread
Lever help needed - by Steve - 07-03-2012, 08:57 PM
RE: Lever help needed - by Steve - 07-04-2012, 01:11 PM
RE: Lever help needed [UNSOLVED] - by Steve - 07-04-2012, 02:01 PM
RE: Lever help needed [UNSOLVED] - by EddieShoe - 07-04-2012, 03:55 PM
RE: Lever help needed [UNSOLVED] - by Steve - 07-04-2012, 04:22 PM
RE: Lever help needed [UNSOLVED] - by EddieShoe - 07-04-2012, 04:37 PM
RE: Lever help needed [UNSOLVED] - by Cruzore - 07-04-2012, 04:23 PM
RE: Lever help needed [UNSOLVED] - by Steve - 07-04-2012, 04:56 PM
RE: Lever help needed [UNSOLVED] - by EddieShoe - 07-04-2012, 05:14 PM
RE: Lever help needed [UNSOLVED] - by Steve - 07-04-2012, 05:37 PM
RE: Lever help needed [UNSOLVED] - by EddieShoe - 07-04-2012, 05:42 PM
RE: Lever help needed [UNSOLVED] - by Steve - 07-04-2012, 05:45 PM
RE: Lever help needed [UNSOLVED] - by EddieShoe - 07-04-2012, 05:56 PM
RE: Lever help needed - by Steve - 07-04-2012, 06:29 PM
RE: Lever help needed - by Traggey - 07-04-2012, 06:40 PM
RE: Lever help needed - by Steve - 07-04-2012, 07:04 PM
RE: Lever help needed [Unsolved] - by Traggey - 07-04-2012, 07:09 PM
RE: Lever help needed - by Cruzore - 07-04-2012, 07:13 PM
RE: Lever help needed - by Steve - 07-04-2012, 07:16 PM
RE: Lever help needed - by Cruzore - 07-04-2012, 07:17 PM
RE: Lever help needed - by Steve - 07-04-2012, 07:22 PM
RE: Lever help needed - by EddieShoe - 07-04-2012, 07:25 PM
RE: Lever help needed - by Steve - 07-04-2012, 07:26 PM
RE: Lever help needed - by Steve - 07-04-2012, 09:01 PM
RE: Lever help needed - by EddieShoe - 07-04-2012, 10:48 PM



Users browsing this thread: 6 Guest(s)