How to control camera on random scenes?
Mazdakfx
Member Posts: 15
Hi,
I have random scenes and one hero .
How to control camera to follow Hero like as there is just one long scene.
here is a template make by GSHelper and I changed it a little bit.
Do I need the Hero for all scenes?
When the scene is change, Hero is going out of camera's control so we have a delay to see it again in next scene,
As I said, I want it to look like a big scene and Hero is running on it.
https://app.box.com/s/0ruo8du2w0vvyjn21je3
Regards,
Mazdak
Best Answer
-
jamie_c ImagineLabs.rocks Posts: 5,772
This is always a delay between scenes. The old scene has to be thrown away and the new scene loaded.
If you don't want that delay you'd have to build all of your levels in one big scene.
Answers
and if you want to connect scenes! the char should touch the place -> and when touched then chance scene
create a invisbile actor (name: changelevel) : inside -> -> Collide ->actor with Tag and a Pic. but first you have to create a Tag on your start screen of GS. after that drag the image into your Tag name. then go to your Char and create Collide -> actor with tag -> name
so: if it touch the invisible changelevel actor then switch scene :-).
I hope I could help you
@Philipppuus Did you check the template?
As you can see, the camera is controling the actor 1, so no need invisible actor!
My problem is when the scene is change, there is a delay to camera control for new scene!
@jamie_c Thank you.
What about random things? Is there any way to add a bunch of items to the big scene radomise ( I mean all item in small scene call it "tag A" and add them random to the scene!).
Sure, you can use the Random Function in the Expression Editor to generate random numbers so you can use that to trigger and/or place your random objects.
One example is if you want to place an object at a random location on screen set up a spawn behavior like this:
Spawn Actor Behavior
X offset: Random (0,100)
Y offset: Random (0,100)
Would spawn your actor at a random position onscreen between 0 and 100 on the X and Y axis.
This is just one sample, there are lots of other possibilities.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
But there is a bunch of actors in small scenes need to add to main scene.
Do I need to spawn all of them one by one? Is there any short way?
Well as I said that is just one example, since I don't really know how you've set up your specific game its nearly impossible for me to say. You could:
You'll have to figure out what works best for your specific needs.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c Thank you. I'll try to figure it out.
Did you check the template I attache in first post?
As you can see there is a hero(actor 1) is running left to right, and there is 5 scene ( as an example).
What I want is:
First time game start on scene 1 and the hero goes to random scenes (3, 5, 4, 2... )
If hero failed (died) at scene 4 and the game reset to start, I want it to change the scenes random to (Ex: 5, 4, 1, 2, 3...)
Lets call it there is ("10 actors in Scene 1", "12 actors in scene 2", "15 actors in scene 3",...)
How to spawn all actors in big scene, "They don't have delay", "Spown out of camera befor hero reached them", and "Spawn in right place"?
Did I make true what do I need?
I think it's a big challenge!
Am I right?
Regards,
Mazdak
Now i know what you mean ^^