How do I set up a pre-game layout?

0 favourites
  • 5 posts
From the Asset Store
20 high quality click sounds, ready to improve your game's UI instantly
  • I surfed the forums but couldnt rlly find anything close to what im lookin for.

    So I want to have a layout before my game_layout starts.

    In that layout I want to put a couple characters with different features which can be able to be picked by the player.

    I can make the layout jump but I have no idea how to actually make it possible to spawn the character the player picked and play that char...

    Thanks in advance.

  • You can store your picked player to a global variable as an ID.

    Then you will use that ID to spawn your character in the game.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can store your picked player to a global variable as an ID.

    Then you will use that ID to spawn your character in the game.

    Thank you for your reply.

    Ive set player initial visibility = invisible and created a global variable to player = false, so when I click the char to choose it sets visibility to true. So far its working ok but I know that when I add the other chars I will have trouble with this method since they will be dragged along with the picked char or if i stop the movement of others the player wont be able to get away from "scroll to" since it'll be applied to all chars.

    Ive tried to remove the char from layer so it will only be created when the global variable is true. I used system - create object but that is re-creating player over and over(per-frame) since gv is set to "true", also messing the movement. I tried to trigger once and the re-creation goes away but the movement is messed up, no movement animations and it gets really weird(8 direction).

    Could you please be more specific on how to store the player in global variable?

  • I managed to fix the re-creation by resetting the global variables but will use the set value since I have lots of global variables coming up and dont want them affected.

    And suddenly remembered that I have to use the include event sheet for my player animations -4- since the event animations are not carried over to the new layout.

    Ty for your reply again, was very helpful.

  • You can check my example:

    drive.google.com/open

    Cheers

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)