How do I finish my game?

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hi everyone! I am new to the Construct 2 community and just have a few questions. I have nearly finished my game but there are still a few more things that I can't seem to work out.

    1) How do I make the game go to a win screen if the players score is high enough and similarly to a lose screen if the player score is too low. The game ends when the player goes through a door but I don't know how to do it from here.

    2) One of the mini-games in my game is having the player pickup a rubbish bin and collect falling objects. I can only seem to pin the bin to the player's image point which is beneath her. How do I make it so that the bin is pinned above her?

  • 1) I assume there's a global variable with the score. Create 2 layouts, the win screen and the lose screen.

    Add a 2 subevents to the player going through the door event:

    Subevent 1

    Condition : System ->Compare variable -> score < [minimum success value]

    Action: Go to layout [Lose Screen]

    Subevent 2

    Condition : System->Compare Variable -> score >= [minimum success value]

    Action: Go to layout [Win Screen]

    2) That's just a simple z order issue. Either right click the bin in the layout and say move to top of layer, or create an event to do the same.

    If you upload a capx I'll be happy to help you out if this wasn't clear.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you so much! You solved my first problem and I can now get it working. I still can't work out the bin thing.

    I don't think I explained it properly the first time, sorry. I am trying to attach the bin above the player's head on collision with that bin.

    In my events, all I have is player on collision with bin. I don't know where to go from here and the player only has an origin point as I don't know how to work image points.

    Also is it possible to get him to put it down after a certain time period?

    Thanks again.

  • Honestly, imagepoints are probably the easiest way to achieve that. But if you want to avoid it the you could say

    on collision with bin:

    Action 1

    bin -> set position -> x: player.x, y: player.y-((player.height+bin.height)/2)

    Action 2

    bin -> pin to player

    Without seeing the game, it's hard to say how best to approach dropping it after a fixed time. I don't like using "wait" commands but you could add a blank sub event with the actions:

    Wait "x" seconds

    Unpin bin

    You'll probably have to set a position, something like set y: self.y+((player.height+bin.height)/2) but without seeing it it's hard to say.

    Or use a timer, add a timer behaviour to the player. Then add a third action to the on collision with bin event saying start timer -> "drop" x seconds.

    Then a new event Player -> on timer -> "drop".....

    Actions:

    Unpin bin

    set y: self.y+((player.height+bin.height)/2)

    Sorry this is messy, hopefully it helps.

  • Again... thank you! It is all working now. There is just one more thing.

    I am trying to get items to drop down upon the player colliding with the rubbish bin. At the moment I have player on collision with bin set bullet angle to 90 (I added a bulled behaviour to items) & rubbish bin on collision with item add points and then destroy.

    Any idea of where to go from here?

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