Loading scene doesn't work via dialog system

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
GDev_23
Posts: 15
Joined: Fri May 28, 2021 1:12 pm

Loading scene doesn't work via dialog system

Post by GDev_23 »

Hello again!

I am trying my best to understand this issue, I've been testing a lot but it doesn't add up.

In the game, there is an object that is used to teleport to other scenes. I am using the Dialog System to offer a choice for the player: save your game or teleport to a place. Like the tutorial explains, I put a LoadLevel LUA command in the Sequence window of the node Teleport of my Dialog. When the player chooses teleport, it is loading in the new scene (Teleport_Scene_A) at the checkpoint (Spawn_Point).

However, when the player is launched in the new scene, the level tries to load itself at every frame and it is impossible for the player to move, as the game screen flickers indefinitely.

What's weird is that I tried with a scene portal (like your tutorial on your Youtube channel) and it works great... but for the game, we need to interact with an object in order to teleport...

How come the scene seems to load it self at every frame like that?

Thanks in advance!
Attachments
My dialog options for the teleport object
My dialog options for the teleport object
Dialog.PNG (42.71 KiB) Viewed 376 times
My command line in the dialog option "Teleport"
My command line in the dialog option "Teleport"
Problem.PNG (12.98 KiB) Viewed 376 times
User avatar
Tony Li
Posts: 22162
Joined: Thu Jul 18, 2013 1:27 pm

Re: Loading scene doesn't work via dialog system

Post by Tony Li »

Hi,

Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. You may be able to trace through what's happening under the hood.

If you're spawning the player onto a ScenePortal, that could cause a loop.

Also keep the Dialogue Editor window open on your teleport conversation. Make sure it ends the conversation and doesn't stay on the last node ("Teleport"). If you're requiring continue button clicks, simulate a continue button using the Continue() sequencer command:

Code: Select all

required LoadLevel(Teleport_Scene_A, Spawn_Point);
Continue()
The 'required' keyword in front of LoadLevel guarantees that LoadLevel runs even if Continue happens to kick off first and stop the conversation.
Post Reply