Hey, everyone, I was wondering, is there a way to move between different scenes using Ace Slide? From what I've seen on the GameTemplate, you can only move between itens within the same scene.
I don't understand fully but let me try to answer how i understood. You can use it everywhere, in different scenecontrollers also (I am guessing you have more than one scenecontroller). Just you need the reference of the scenecontroller you want to switch. That's it.
Or in the beginning hold scenenames globally in an array than you can refer them whenever you want.
Note: If i understood not correctly and my answer is not satisfactory please give us some more detail
@talis Yeah, sorry for the lack of details, let me explain it a little better:
In my game, I have game areas, each area contains 4 minigames of an specific theme. Each of those minigames have a selection screen that presents to the player a description of the minigame and the "Start" option.
What I wanted is to cycle through these screens using Ace Slide. Therefore I presumed that I would have to add each screen as a element for the Slider, but in the template I was trying to use, only elements inside the current scene are added to the Slider.
My question is if I can add different screens (scenes, from scene manager) to the Ace Slide, how could I do that?
@ar2rsawseen I downloaded the project, but to be honest I'm kinda lost on how to implement it on my current project.
So, I thought of trying the sceneManager method, but given the limitations I sorta gave up. @ar2rsawseen Now, I am pretty sure that the AceSlide method can help me, but when I try do put the AceSlide.lua from the AceSlide_oop project you suggested it gives me this error:
classes/gtween.lua:69: attempt to call method 'addEventListener' (a nil value) stack traceback: classes/gtween.lua:69: in function 'staticInit' classes/gtween.lua:434: in main chunk
which would be this inside the gtween.lua:
function GTween.staticInit()68 GTween.shape = Shape.new()69 GTween.shape:addEventListener(Event.ENTER_FRAME, GTween.staticTick)70 GTween.time=os.timer()end
What I find odd is that I don't even call the AceSlide on any other .lua, by just being in my project it causes that error... Because of that I can't even try the AceSlide method... what could be causing it?=/
Ok... I somehow found out the problem, I just don't understand why it happens...
For some unknown reason to man, jthe problem was that I already had an class called Ace.Slide.lua on my project. Because of that, any class that I tried to create with "Ace" on the name would result in the same error.
While over the moon about solving this I still can't figure out why it happened. I mean, I would understand if the .lua had the same name of an existing one, but it wasn't the case as far as my understanding goes.
So I tried implementing the AceSlide method @ar2rsawseen suggested but I think I have no idea on how to reference the scenemanager's scenes. Here is what I have so far:
*Create each screen as you would create separate scene (or reuse same scene, if you load data dynamically). I used sceneManager for this:
*Then you need to create separate scene, where you add AceSlide as a child of this scene For this step I created a scene called GeneralSelections. This is the code inside GeneralSelections.lua
Oh, I didn't get it at first. To be honest, since I started using Gideros, I always used sceneManager to manage transition between screens. Thus I forgot completely the usual way to do it.
Comments
Or in the beginning hold scenenames globally in an array than you can refer them whenever you want.
Note: If i understood not correctly and my answer is not satisfactory please give us some more detail
Likes: AxlFlame
https://github.com/ar2rsawseen/AceSlide_oop
Likes: AxlFlame
Yeah, sorry for the lack of details, let me explain it a little better:
In my game, I have game areas, each area contains 4 minigames of an specific theme.
Each of those minigames have a selection screen that presents to the player a description of the minigame and the "Start" option.
What I wanted is to cycle through these screens using Ace Slide. Therefore I presumed that I would have to add each screen as a element for the Slider, but in the template I was trying to use, only elements inside the current scene are added to the Slider.
My question is if I can add different screens (scenes, from scene manager) to the Ace Slide, how could I do that?
@ar2rsawseen I downloaded the project, but to be honest I'm kinda lost on how to implement it on my current project.
Well in this case you could be using two approaches:
using AceSlide
http://www.giderosmobile.com/forum/discussion/comment/17531#Comment_17531
Likes: AxlFlame
@ar2rsawseen Now, I am pretty sure that the AceSlide method can help me, but when I try do put the AceSlide.lua from the AceSlide_oop project you suggested it gives me this error:
classes/gtween.lua:69: attempt to call method 'addEventListener' (a nil value)
stack traceback:
classes/gtween.lua:69: in function 'staticInit'
classes/gtween.lua:434: in main chunk
which would be this inside the gtween.lua:
Can you share the project?
For some unknown reason to man, jthe problem was that I already had an class called Ace.Slide.lua on my project. Because of that, any class that I tried to create with "Ace" on the name would result in the same error.
While over the moon about solving this I still can't figure out why it happened. I mean, I would understand if the .lua had the same name of an existing one, but it wasn't the case as far as my understanding goes.
Here is what I have so far:
*Create each screen as you would create separate scene (or reuse same scene, if you load data dynamically). I used sceneManager for this:
I have these four scenes on my sceneManager:
For this step I created a scene called GeneralSelections. This is the code inside GeneralSelections.lua
As in if you have
The latter approach suggested uses SceneManager, there is also an example project to the link provided in the post
Likes: AxlFlame
Thanks a lot, @ar2rsawseen! Works like a charm!