Forum rules - please read before posting.

Onstart not working

Hi!,

this is what i want to happen when i enter from the 2 other scenes

https://imgur.com/tihQ6C8

But the player still "spawn" on the first playerStart and the object (hjort) is still there,
both if i enter from scene 1 or 2.`

https://imgur.com/uyGB7Dc

And in a scenario like this, is it correct to use onstart or onload?

Malte

Comments

  • For the difference between OnStart and OnLoad, see the Manual's "Adding interactivity" chapter. OnStart is called when the scene begins through natural gameplay, and OnLoad is called when the scene begins due to loading a save game file.

    The OnStart cutscene is run after the scene has been initialised - including the placement of the Player.

    You don't need to change the scene's default PlayerStart to determine where the Player starts from. The "Default PlayerStart" field, assigned in the Scene Manager, is only used when starting the game from this scene - or if no appropriate PlayerStart is otherwise found when entering it.

    In the PlayerStart's Inspector, you can configure it's "Previous scene" fields to tell it which previous scene it should be used for. Do this, and remove the Scene: Change setting Actions from your OnStart cutscene.

    There's also no need for the ActionList: Run in parallel Actions, since none of the Actions take more than a single frame to process. You can connect the two Scene: Check Actions together, so that if the check for scene 1 fails, it then runs the check for scene 2. And if either of them are succesful, they can then both run the same Object: Add or remove Action.

    Once changed, and the object still remains, try running the Cutscene manually at runtime by clicking the "Run now" Action. Does it then work? How about if you remove the scene checks so that the object-remove Action is always called first?

  • https://imgur.com/cbYPCee

    now the object is removed when i want it to and no paralell action needed!

    I didn´t notice that you could set the previus scene number diirectly in the palyerstart inspector. thats so much cleaner.

    Thank you so much!
    so helpfull. :)

    Malte

  • No problem - you can also have both Scene: Check Actions run the same Object: Add or remove Action, no need to have two of them that do the same thing.

  • edited August 2019
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.