One Rule to Handle Multiple Scene Links in Scene Menu
millerbrother1
Member Posts: 108
I'm working on a game with 20 levels. Each level has its own Game Attribute called HiScore1, HiScore2, etc.
What I'm trying to do now is create a menu of 20 icon buttons that link to each scene. But I want to do this without having to change the behaviors in each button. Each button has an integer attribute called "Level" in it (self.Level) which I will change after I make a scene specific instance of the actor later.
In the meantime, I'm trying to write generic logic that will handle changing the scene to the corresponding scene when the button is pressed. It would look something like this.
IF actor receives event TOUCH is pressed
- Change Scene to "Level-"..self.Level
The only problem is that the Change Scene behavior doesn't accept building an attribute like this.
Is there another way?
What I'm trying to do now is create a menu of 20 icon buttons that link to each scene. But I want to do this without having to change the behaviors in each button. Each button has an integer attribute called "Level" in it (self.Level) which I will change after I make a scene specific instance of the actor later.
In the meantime, I'm trying to write generic logic that will handle changing the scene to the corresponding scene when the button is pressed. It would look something like this.
IF actor receives event TOUCH is pressed
- Change Scene to "Level-"..self.Level
The only problem is that the Change Scene behavior doesn't accept building an attribute like this.
Is there another way?