Hi everyone, I hope this place will help with the answer, maybe my question will seem silly. I'm trying to do a quest and I need to do this mechanics: When you click on one of the objects, should activate a point in the same scene, to move to another. I tried to do through if else, for some reason comes out an error, I attach the code below. I hope for your help! I apologize for possible mistakes, my main language is Russian, I write through a translator.
Additionally, is it possible to implement something like a gallery? I see it as a sprite where each frame is a separate photo, when you click on the buttons the frame changes. And also, is it possible to disable fade when switching to another scene? I saw this parameter in ChangeScene, but maybe it is possible to do it globally?
Translated with DeepL.com (free version)
#include "scripts\base.inc"
// here comes the stuff which initializes the scene
global meow;
////////////////////////////////////////////////////////////////////////////////
// scene state
global Statespal1;
{
if(meow == 1) {
Scene.GetNode("meow").Active = true;
}
else {
Scene.GetNode("meow").Active = false;
}
}
// default values
if(Statespal1==null)
{
Statespal1.Visited = false;
// add scene states here
}
////////////////////////////////////////////////////////////////////////////////
// setup scene according to state variables
////////////////////////////////////////////////////////////////////////////////
if(!Statespal1.Visited)
{
Statespal1.Visited = true;
// this is our first visit in this scene...
}
Click script:
#include "scripts\base.inc"
on "LeftClick"
{
meow = 1;
Scene.GetNode("meow").Active = true;
Game.Msg("CatActivate!");
}