Hi all,
This issue (which likely has a simple solution) is single-handedly holding up my game's development, so I'd really appreciate the community's help!
A good 80% of my game, Detective Cube in: Poly-Gone!, is made up of cutscenes. Problem is, I can't script them to work properly.
I'm using the Dialogue Editor to script them. Each line of dialogue has camera movement and voice acting (using the play_sound script - if there's a better way, please let me know).
Here's my total spaghetti scripting for the game's first line.
(Node 1)
lock_camera();
set_player_interaction_locked(true);
set_player_movement_locked(true);
move_camera(coord[-2, -4, 30], player);
fade_in(1);
set_global_property("dialogue_trigger", true);
if global.property["dialogue_trigger"] == true then
play_sound("dc_test_line_001.wav");
move_camera_over_time(coord[-1, -3, 24], 10, player);
end;
(Node 2 - Player Dialogue)
Here's the problem. If I click to skip ahead, play_sound and move_camera_over_time don't stop.
Let's say Line A, Line B, and Line C all have play_sound and move_camera_over_time commands.
- If I skip Line A and the camera's still moving, Line B's camera command never triggers.
- If I skip Line A and Line B while Line A's camera is still moving, it skips Line B's camera command, executes Line C's camera command, then goes back to finish Line A's camera command!
- If I skip Line A before its audio finishes, Line B's audio plays without cutting off Line A's audio.
- If I skip Line A and Line B before their audio finishes, I get three audio tracks playing at once.
- A stop_sound command between Line A and Line B does not seem to trigger if Line A is skipped.
I think there's two possible solutions to these issues. I just don't know how to do them (or if they're possible).
- Solution 1: Script each line in such a way that the play_sound and move_camera_over_time commands are canceled when dialogue is skipped.
- Solution 2: Script the cutscene to be unskippable and advance to the next line of dialogue automatically.
Does anyone know how to do either of these fixes? Solution 1 would be much less annoying for players, but I'll take Solution 2 if it means being able to finish my game. I'd be extremely grateful if anyone knows what to do!