[4.1.5] Cutscene making

SoulBlayzR

New member
Hey again, I keep having problems with my game... This time, I'm trying to make a cutscene.

Here's what I'm trying to accomplish - sometimes there will be cafes you can enter. Doing so should initiate a cutscene. But it doesn't work right...
NfjsW7v.png

(Sorry for the large image! I tried making it smaller, but it didn't work...)

First of all, the player should be invisible. But, CutterCross' "hide player" tile collision doesn't work for this. Is there another thing I can do?
Next I want to open a text box. I made an AI script that does that, but it only opens the first text in the group. Is there a way to open any other texts?
Finally, when I attempt to hide the HUD, the health meter still shows up for some reason. I'm not sure why this happens, but I'd like a way to fix it...

As for the cutscene itself, well... When Lily enters the cafe I want her to walk over and take a seat. Then, the Barista asks her what she wants, and then she goes back and gets the drink for her. Another text box comes up telling her to enjoy her drink, and after a wait, another textbox will come up with the conversation. Finally, Lily gets out of her seat, and the Barista tells her goodbye in the last textbox.

How difficult would that be?
 

dale_coop

Moderator
Staff member
For the cuttercross' invisible tile... if I remember well, the screen needs to have gravity set in order to work. Have you tried (just make all the tiles around your player, "solid" tiles).

For the hide hud issue... you need to modify the script assigned to the "Handle HUD data" element in "Project Settings > Script Settings", at line 2, add this bloc of code:
Code:
	;; if "hide hud" is set for the screen, skip this script:
	LDA screenFlags
	AND #%00000001
	BEQ +
	RTS
+

For your text, have you try using the ">" to separate your text in pages...
for example, for your Text:
Code:
This is the text 
of my page 1>
Now the page on 
the page2>
This is the
last page
When you press "b" it should show the next page... until the end.
 

SoulBlayzR

New member
dale_coop said:
For the cuttercross' invisible tile... if I remember well, the screen needs to have gravity set in order to work. Have you tried (just make all the tiles around your player, "solid" tiles).

For the hide hud issue... you need to modify the script assigned to the "Handle HUD data" element in "Project Settings > Script Settings", at line 2, add this bloc of code:
Code:
	;; if "hide hud" is set for the screen, skip this script:
	LDA screenFlags
	AND #%00000001
	BEQ +
	RTS
+

For your text, have you try using the ">" to separate your text in pages...
for example, for your Text:
Code:
This is the text 
of my page 1>
Now the page on 
the page2>
This is the
last page
When you press "b" it should show the next page... until the end.

- I added gravity to the screen, but whenever the text box opens, Lily shows up. When it disappears, she does too. The monster version of Lily is unaffected by this.

- The fix you provided for the HUD worked, thank you.

- As for the text, the problem is that I can only have 255 characters in one text entry, so although I can use >, I'd run out of space very fast. And I have a lot of text to display... Instead, I'd like a way to change the text entry currently used to another text in the same text group.
 

Bucket Mouse

Active member
SoulBlayzR said:
- As for the text, the problem is that I can only have 255 characters in one text entry, so although I can use >, I'd run out of space very fast. And I have a lot of text to display... Instead, I'd like a way to change the text entry currently used to another text in the same text group.

So do I! I've pored over the HandleTextBox display code multiple times, and I just can't find the one component that will let me reload the box with the next 255 characters instead of having it shut off. Has anyone else had any breakthroughs there?
 

dale_coop

Moderator
Staff member
For using the disappearTile... have you made the invisible animation in your Player object (assigned to a "invisible" animation type, assigned to the Action Step 7), as explained in CutterCross tutorial?
 

SoulBlayzR

New member
dale_coop said:
For using the disappearTile... have you made the invisible animation in your Player object (assigned to a "invisible" animation type, assigned to the Action Step 7), as explained in CutterCross tutorial?

Yes, I've done all of that. It works fine if there's no textbox being displayed, but if there's a textbox at all, it won't work.
 

dale_coop

Moderator
Staff member
Oh ok... is it the textbox that shows the player or is it any inputs pressing button.
Maybe you assigned a jump or attack or any action script to the pressing button, that makes the player move/changing state/...

Could you share a screenshot of your "Input Editor"?

Maybe you need to add some code of every player input scripts, to disable the code when the player is HIDDEN.
Something like :
Code:
    ;; checking the current state of the player:
    GetCurrentActionType player1_object
    CMP #$07	;; if in "invisible" state
    BNE +
    ;; skip the script:
    RTS
    +
    
    ;; from here the rest of the script:
 

dale_coop

Moderator
Staff member
So yeah, you should add the block of code to all the movement and player melee and jump scripts. To disable the script when the player is invisible or check if the screen is a cutscene.
Or maybe you already have that kind of code in scripts?
 

SoulBlayzR

New member
The problem here isn't that the player can move, either... The problem is that she is visible.

Here's an idea I had though... How about if the cutscene tag is set on the screen, set the player's palette to a blank palette. Otherwise, just use the normal palette. How easy would that be
 

dale_coop

Moderator
Staff member
In fact, on the moving script, the shooting script, the melee script... the code makes the player changing his state (=action step)! So he will no more be in the "invisible" state (action step 7).
So for all your cutscenes screens, or when your player is in action step 07, you need to disable those scripts... Else, you press any key on your controller and the player changes state (come back to Action Step 3 or 2, then back to his default "Action Step 0").

Invisibilty in yuor case is just a temporary Player state... so you need to keep him in this state.
 

Raftronaut

Member
dale_coop said:
Oh ok... is it the textbox that shows the player or is it any inputs pressing button.
Maybe you assigned a jump or attack or any action script to the pressing button, that makes the player move/changing state/...

Could you share a screenshot of your "Input Editor"?

Maybe you need to add some code of every player input scripts, to disable the code when the player is HIDDEN.
Something like :
Code:
    ;; checking the current state of the player:
    GetCurrentActionType player1_object
    CMP #$07	;; if in "invisible" state
    BNE +
    ;; skip the script:
    RTS
    +
    
    ;; from here the rest of the script:

Wow, this is a great fix Dale!
 

SoulBlayzR

New member
Hey, so this fix still doesn't work. But I might be able to start a check for if the cutscene bit is on and automatically make the player invisible when the screen loads, but... IDK how to do that. It might just be easier to change her palette.
 

dale_coop

Moderator
Staff member
Strange... Your project might have some specific codes that prevent the invisible code to work... because it worked on my demo projects (basic plaformer demo).

But if you want, I could check your project and tell you what's going on and how to fix that? (I'd need the project .MST file, the "GraphicAssets" and "GameEngineData" folders)
 

dale_coop

Moderator
Staff member
My suggestion to this issue, if the current screen is a cutscene (or a specific screen-type screen), let's make the engine not drawing the player.

To do that, modify the script assigned to the "Handle Sprite Drawing" element in the "Project Settings > Script Settings".
And after the "objectNotDeactivated:" line, add this block of code:
Code:
	;; hide player when screen-type 255
	CPX player1_object
	BNE +
	LDA screenType
	CMP #$FF ;; #255
	BNE +
	RTS
	+
 
Top Bottom