Page 1 of 1

How to keep the event?

Posted: Fri Aug 04, 2023 12:40 am
by JeyWoo
As shown in the screenshot, if I add an event in the dialog system, the event works fine at first.
When I move the scene, the dialog event is not applied like the screenshot. What should I do?

Re: How to keep the event?

Posted: Fri Aug 04, 2023 8:30 am
by Tony Li
Hi,

This message explains the issue:

sceneEvent.png
sceneEvent.png (26.46 KiB) Viewed 254 times

You have configured an event to happen in a specific scene. If you have opened another scene, you cannot see that event in the editor.

If you don't want to tie an event to a specific scene, please use sequencer commands.

Re: How to keep the event?

Posted: Sun Aug 06, 2023 11:24 pm
by JeyWoo
Thank you to reply
So I use SendMessage of sequence on Dialogue System
but It dosen't work..
SendMessage(ShakeDialogue, 5, gameObjectName);

Re: How to keep the event?

Posted: Mon Aug 07, 2023 11:49 am
by Tony Li
Hi,

The 3 parameters to SendMessage() are:
  • Method name
  • String parameter*.
  • Name of GameObject that has a script with the specified method name.
Your method must accept one string parameter or no parameters. If it accepts no parameters, leave this parameter blank. Examples:

If a GameObject named "Front Door" has this method:

Code: Select all

public void OpenDoor() { .... }

Then use this sequencer command:

[code=sequence]SendMessage(OpenDoor, , Front Door)
If a GameObject named Screen Effects has this method and you want to pass the parameter "shake":

Code: Select all

public void PlayEffect(string effectName) { ... }
Then use this sequencer command:

Code: Select all

SendMessage(PlayEffect, shake, Screen Effects)