01-07-2014, 02:57 AM
I've placed the Machine for Pigs elevator and lever in my game, but seem to be having a strange problem. When I pull the lever down, and it attaches the static version to the elevator pod, there is some invisible obstruction that is blocking me from walking through the middle of the elevator. It's like there's a wall splitting the elevator in half.
It only seems to exist in the elevator itself (including when it's moving), as I can walk around outside the elevator just fine. I've checked out the model for the elevator pod and the static elevator switch, but don't see anything that could be preventing me from moving around. Does anyone know what might be causing this?
Here is my script:
I've tried both the old AddAttachedPropToProp script, and the new one for the update, and have the problem with both
It only seems to exist in the elevator itself (including when it's moving), as I can walk around outside the elevator just fine. I've checked out the model for the elevator pod and the static elevator switch, but don't see anything that could be preventing me from moving around. Does anyone know what might be causing this?
Here is my script:
PHP Code:
void OnStart()
{
SetMultiSliderCallback("ElevatorSwitch_1", "ElevatorAscent");
}
void ElevatorAscent (string &in asEntity, int alState)
{
if (alState == 1)
{
AttachPropToProp("elevator_pod_2", "ElevatorSwitchStatic2", "elevator_switch_static.ent", 0.06f, -1.842f, -0.068f, 0.0f, 0.0f, 0.0f);
PlaySoundAtEntity("", "church_draw_lever_open.snt", "Player", 0.0f, false);
SetEntityActive("ElevatorSwitch_1", false);
SetMoveObjectState("elevator_door_right_1", 0);
SetMoveObjectState("elevator_door_left_1", 0);
PlaySoundAtEntity("", "reactor_elevator_door_close_3D.snt", "ElevatorDoorSource", 0.0f, false);
PlaySoundAtEntity("", "reactor_elevator_door_close_2D.snt", "ElevatorDoorSource", 0.0f, false);
AddTimer("ElevatorMoves2", 3.5f, "ElevatorMoves2");
}
}
void ElevatorMoves2 (string &in asTimer)
{
SetMoveObjectState("elevator_pod_2", 1);
AddTimer("", 27.0f, "OpenBasementDoors2");
}
void OpenBasementDoors2 (string &in asTimer)
{
SetMoveObjectState("elevator_door_right_4", 1);
SetMoveObjectState("elevator_door_left_4", 1);
PlaySoundAtEntity("", "reactor_elevator_door_open_3D.snt", "ElevatorDoorSource_2", 0.0f, false);
PlaySoundAtEntity("", "reactor_elevator_door_open_2D.snt", "ElevatorDoorSource_2", 0.0f, false);
}
I've tried both the old AddAttachedPropToProp script, and the new one for the update, and have the problem with both