Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Change scene without transition — Gideros Forum

Change scene without transition

e2000e2000 Member
edited June 2016 in General questions
Hi,
I'm using sceneManager for change scenes, how can i use changeScene method without transition for that? i mean i want to realy simple just change the scene , without any effect!
when i use :
sceneManager:changeScene("tutorial")
for example, i get this error :
scenemanager.lua:336: attempt to perform arithmetic on field 'duration' (a nil value)
stack traceback:
scenemanager.lua:336: in function
How to make this work?
Thanks.

Comments

  • antixantix Member
    edited June 2016 Accepted Answer
    One possible solution would be to use a fade effect with a very small duration.

    The only other option is to modify sceneMamager.lua and create a new option called "immediaite" which would be a bool and if true just change the scenes without any effects.
  • piepie Member
    edited June 2016 Accepted Answer
    @e2000 scenemanager:changeScene is expecting a "duration" field that you are not providing in
    sceneManager:changeScene("tutorial")
    as you can see here (https://github.com/gideros/Scene-Manager/blob/master/scenemanager.lua#L266) there is no fallback if any parameter is missing except the one for self.ease

    Antix is right, actually you can use any effect since nobody would see it if it's too fast.
    I believe that you can also use 0 as a valid duration value.
Sign In or Register to comment.