Sie sind nicht angemeldet.

1

Montag, 4. April 2022, 01:04

Identify a scene and take a relevant action

Hi,

I would like to know if someone could help me with this question?

I would like to do an action, if it's in the scene_01, an action happens, but if it's not in the scene_01, another action happens.

I would need to identify if it is in the scene_01 or if it is not, and list the relevant actions.

I tried some options but nothing worked correctly because I don't know how to do it.

Quellcode

1
2
3
4
5
6
7
8
<action name="open_lobby" scope="local">
	if(scene.(scene_lobby),
			moveto(117.85190579100282,1.5640191759757445,linear(50));
			,			
			loadscene(scene_lobby, null, MERGE, BLEND(1)); 
			moveto(117.85190579100282,1.5640191759757445,linear(50));
			);
	</action>


Regards

Fernando

Fortgeschrittener

Beiträge: 330

Wohnort: Habana, Cuba

Beruf: Architect, Photographer.

  • Nachricht senden

2

Montag, 4. April 2022, 04:00

Try something as:

Quellcode

1
2
3
4
5
If(xml.scene == "scene_lobby",
myAction1();
,
myAction2();
);


xml.scene is the current loaded scene

3

Montag, 4. April 2022, 13:10

Extraordinary.
Thank you so much