How to control camera on random scenes?

MazdakfxMazdakfx Member Posts: 15
edited March 2014 in Working with GS (Mac)

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

Answers

  • PhilipppuusPhilipppuus Member Posts: 62

  • PhilipppuusPhilipppuus Member Posts: 62

    and if you want to connect scenes! the char should touch the place -> and when touched then chance scene

  • PhilipppuusPhilipppuus Member Posts: 62

    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 :)

  • MazdakfxMazdakfx Member Posts: 15

    @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!

  • MazdakfxMazdakfx Member Posts: 15
    edited March 2014

    @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!).

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    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.

  • MazdakfxMazdakfx Member Posts: 15

    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?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    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:

    1. Spawn them like I mention above.
    2. Read their X and Y locations from a table
    3. Place each by hand
    4. I'm sure there are more ways...

    You'll have to figure out what works best for your specific needs.

  • MazdakfxMazdakfx Member Posts: 15

    @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? :D

    Regards,

    Mazdak

  • PhilipppuusPhilipppuus Member Posts: 62

    Now i know what you mean ^^

Sign In or Register to comment.