Enviromental Cutscene issue

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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
WojtTheDoomer2K
Posts: 154
Joined: Sun Aug 27, 2023 5:46 pm
Location: Lower Silesia, Poland

Enviromental Cutscene issue

Post by WojtTheDoomer2K »

Im trying to improve my enviromental cutscene-making skills, and I want to make a more "advanced" cutscene that goes like this, I am however unable to program it (I use ACS btw):


The idea is that the player, and an NPC, go to a building (that I already programmed, using Patrol Points), the NPC pauses before the door and talks to the player, and then they both go through. But here's the thing - I don't know how to trigger the "talk" animation when the NPC crosses a certain point. Anyone knows how to do that?

I already tried lines and sectors set to activate the "talking" script once the NPC crosses them, but they just don't work.

EDIT: Tried a Patrol Special; somehow it doesn't work either.
User avatar
Enjay
 
 
Posts: 27402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Enviromental Cutscene issue

Post by Enjay »

Patrol specials are the correct thing to be using here. They are specifically designed to trigger a special (e.g. a script) when an actor reaches the patrol point linked to the special. Line activated scripts can also work if you prefer them.

If those are not working, there must be something in your setup preventing them.

Or perhaps it is working, but not being displayed. I don't know what your "talk animation" entails. If it's a Print or HUDMessage script, for example, it could be getting cast to the NPC's view, rather than the player's if the NPC is considered to have triggered the script and this has not been taken into account. So, it could be working, but the player can't see it. If this is the problem, then using PrintBold or HudMessageBold instead of Print or HudMessage might solve the problem because these cast to everyone's view unconditionally.

If it's not that, we're going to need to see your code or, even better, the map where the effect isn't working. There are just too many things to guess about what "they just don't work" might mean and what your specific setup is.
User avatar
WojtTheDoomer2K
Posts: 154
Joined: Sun Aug 27, 2023 5:46 pm
Location: Lower Silesia, Poland

Re: Enviromental Cutscene issue

Post by WojtTheDoomer2K »

Enjay wrote: Wed Jan 29, 2025 11:46 am Patrol specials are the correct thing to be using here. They are specifically designed to trigger a special (e.g. a script) when an actor reaches the patrol point linked to the special. Line activated scripts can also work if you prefer them.

If those are not working, there must be something in your setup preventing them.

Or perhaps it is working, but not being displayed. I don't know what your "talk animation" entails. If it's a Print or HUDMessage script, for example, it could be getting cast to the NPC's view, rather than the player's if the NPC is considered to have triggered the script and this has not been taken into account. So, it could be working, but the player can't see it. If this is the problem, then using PrintBold or HudMessageBold instead of Print or HudMessage might solve the problem because these cast to everyone's view unconditionally.

If it's not that, we're going to need to see your code or, even better, the map where the effect isn't working. There are just too many things to guess about what "they just don't work" might mean and what your specific setup is.

Thanks a lot! It was indeed "print" not displaying, when I replaced it with PrintBold it worked! Thank you, now I can make my mods even more alive and cinematic than before!
User avatar
Enjay
 
 
Posts: 27402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Enviromental Cutscene issue

Post by Enjay »

Cool, glad you got it sorted. :thumb:

The problem is one that many people don't even realise is possible (i.e. that the message is getting printed to the script activator, even if they are just a monster/NPC/some other actor). So you end up in that frustrating situation of trying something over and over in various combinations and banging your head on the desk wondering why it's not working when you've done "nothing wrong".

Once you know about it though, you realise pretty quickly - "hang on, the script was started by a monster, I bet I need to use PrintBold."
Post Reply

Return to “Scripting”