I have read the following pages:
https://zdoom.org/wiki/ChangeCamera
https://zdoom.org/wiki/Classes:MovingCamera
https://zdoom.org/wiki/Definitions#Byte_Angles
But none have answered what exactly I'm doing wrong. Previously I have successfully managed to make a camera work successfully, but this time not so much. I'm not sure why... as far as I can tell, I'm doing it the same as always.
What's supposed to happen with this script... the player walks down a corridor with a hole in the ground in front of them... the script freezes the player before the hole is reached. The camera shakes, the camera turns round smoothly but fast to reveal a demon has spawned in behind them (an animated thing for cutscene purposes), that attacks the player (part of the animation) knocking the player back and down the hole, trapping the player. It also harms the player. Then the animation of the demon is removed and the camera is returned to the player as they are unfrozen and control is returned.
Currently, it does not do this. It just makes the room shake, then the player is hurt and thrown down the hole. The camera does not turn to face the demon at all, and im not certain, but I don't even think the demon is spawned in to begin with (because the sound that it makes as defined in DECORATE cannot be heard.)
My ACS script it as follows:
Code: Select all
script 100 (void)
{
SetPlayerProperty (0, 1, PROP_TOTALLYFROZEN);
Radius_Quake (9,5*35,0,9,0);
delay (5);
Thing_Activate (999);
delay (2);
ChangeCamera (999, 0, 0);
SpawnSpotFacingForced ("ShedimAttack", 1000, 1001);
delay (30);
DamageActor (0, 0, 1001, 1001, 20, MOD_UNKNOWN);
delay (30);
ThrustThing (64, 200, 0, 0);
Thing_Deactivate (999);
ChangeCamera (0, 0, 0);
delay (10);
Thing_Remove (1001);
SetPlayerProperty (0, 0, PROP_TOTALLYFROZEN);
}
Can anyone please help me out and point out what I'm doing wrong? I've tried to be as clear as possible.