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
EddieShoe Offline
Junior Member

Posts: 28
Threads: 6
Joined: Sep 2010
Reputation: 0
#9
RE: Lever help needed [UNSOLVED]

(07-04-2012, 04:22 PM)Steve Wrote:
(07-04-2012, 03:55 PM)EddieShoe Wrote: So, I think I got what you meant. It works for me on my map, but I am not 100% sure this is what you wanted. I'm no pro at this either, I just tried my best. I've learned a lot from Your Computer so you should definitely try out his tutorials. Anyway, here's the script:

void leverfunc(string &in asEntity, int alState)
{
if (alState == 1)
{
SetSwingDoorClosed("your_door_here", false, false); Don't know if this has to be here, opens to door.
SetSwingDoorDisableAutoClose("your_door_here ", true); Disables auto-closing of the door.
AddPropImpulse("your_door_here ", X, Y, >, "world"); Opens the door in the desired direction.
return;
}
if (alState == -1)
SetSwingDoorClosed("your_door_here", true, false); Closes the door.
}

EDIT: Maybe you want to add SetSwingDoorDisableAutoClose("your_door_here ", false); under the -1 state as well, just before the SetSwingDoorClosed.
It gives me this error :/
main (41, 43): ERR : Exected expresion value
I put it in like this.
void OnStart()
{
SetEntityConnectionStateChangeCallback("LeverComplete", "leverfunc");
}
void leverfunc(string &in asEntity, int alState)
{
if (alState == 1)
{
SetSwingDoorClosed("hatch_drainage_1", false, false);
SetSwingDoorDisableAutoClose("hatch_drainage_1", true);
AddPropImpulse("hatch_drainage_1", 0, 0, >, "world");
return;
}
if (alState == -1)
SetSwingDoorClosed("hatch_drainage_1", true, false);
SetSwingDoorDisableAutoClose("hatch_drainage_1", true);
}


at the X and Y part I had no idea what to fill in so I just put 0, 0 like YC
line 41 is : AddPropImpulse("hatch_drainage_1", 0, 0, >, "world");


AH! I forgot to change that typo, it's supposed to say X, Y, Z and you have to change it to the axis you want it to move along. That was a minor mistake but still dumb, sorry! Example is 0, 0, 15, that will move it +15 along the Z axis.

Currently working on: "Awake"
Progress: ~5%
07-04-2012, 04:37 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: 7 Guest(s)