In Dreadnought, I'm making a morph ball tunnel that changes the player camera to an aiming camera when the player enters the tunnel. This works fine and activates the script every time. The problem is, the camera also pans its height to match the player's height in the tunnel, and adding a LINE_BACK condition in a loop isn't breaking out:
Code: Select all
script "Camera_On" (void)
{
int playerz; //store player's z value for the camera
//When LineSide() == LINE_BACK this will break (or not)
while ((LineSide() == LINE_FRONT) == TRUE)
{
TakeInventory("PlayerMorphCamera", 0X7FFFFFF);
Thing_Activate(14);
ChangeCamera(14,TRUE,FALSE);
playerz = GetActorZ(PlayerNumber());
Log(f:playerz);
SetActorPosition(14,GetActorX(14),GetActorY(14),playerz,FALSE);
Delay(1);
}
//Reset camera
GiveInventory("PlayerMorphCamera", 1);
Thing_Deactivate(14);
ChangeCamera(0,TRUE,FALSE);
ACS_ExecuteAlways(587,0,90,4);
}
Also, my activation lines are all set to be doublesided, activated when player walks over, and repeatable. I feel like I'm just missing something simple but I'm running out of ideas.
