Moving Camera + It's script is giving me HELL.

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Moving Camera + It's script is giving me HELL.

Post by Hidden Hands »

I cannot for the life of me figure out what I am doing wrong here. Initially, my game was set for release for tomorrow. This is now not going to happen, as there is just too many little details that need work. However, this one is the most irritating I have encountered.

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);
}
My map layout for the camera path is in the attachment. The demon TID spot is 1000 and changes to 1001 afterwards so it can be removed after the attack, and the camera TID is 999.

Can anyone please help me out and point out what I'm doing wrong? I've tried to be as clear as possible.
Attachments
DUFS.png
User avatar
Logan MTM
Posts: 678
Joined: Mon Jan 16, 2006 8:53 pm
Location: Rio de Janeiro - Brazil

Re: Moving Camera + It's script is giving me HELL.

Post by Logan MTM »

Yes, please, post a map sample.
Post Reply

Return to “Scripting”