Scene Indexes and Accesing for Scene Changes
fmakawa
Member Posts: 565
HI Folks, so the scene change behaviour can use an index to change scenes. That index if I am not mistaken is decided by the order in which you arranged your scenes. I would like to be able to read into this index so I dont have a specific scene order as I code that way I can chop and change at will. Without adding an additional attribute is it possible to make an in-scene actor recognise the index # of that scene automatically? I can't seem to locate any index of the sort, even with an unlocked actor and I figured it either doesn't exist or I am being an idiot (highly likely). Any one have any ideas? Or Will I have to create a specific order to follow?
Comments
No, you can access the Scene name but not the index. I think that would be useful at times. I suppose you could name your scenes "1", "2", "3", etc. and then use that in an integer attribute but you'd still need to have a separate attribute for that. Unless you do something like scene.Name+2 in an expression. That might work.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Turns out it does work. Here's a demo. Click anywhere in the first scene and it skips to the third using the mathematical expression scene.Name+2.
https://www.dropbox.com/sh/kuvxm5cmhflga7k/AAAc9cZrhCnD0P0yvPTXYJBYa?dl=0
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks!