GameSalad

Howdy, Stranger!

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

[Solved] How to make the game end

http_gamesaladhttp_gamesalad Posts: 1,340Member
edited May 2015 in Working with GS (PC)

I want to know how to achieve gameover as soon as the main acot (red square) touches the very tip of the grey line. Is this possible? thanks :)

Image and video hosting by TinyPic

Comments

  • http_gamesaladhttp_gamesalad Posts: 1,340Member

    bump?

  • GnarlyGnarly canadaPosts: 840Member

    For me? Depends how the purple or grey areas are being generated and what they are doing??? Is it random? Whats happening?

    I assume the red square is travelling up and the grey is falling??? (the effect you are looking for)

    I would make a full grey background and then have purple actors that I would spawn individually (one on each side) on top of each other and have them move down. Sort of up and down flappy birds idea.

    Then simply use a collide rule with red square and purple actors........

  • GnarlyGnarly canadaPosts: 840Member

    Sorry I think I see what you are trying to do........ The square is half over the grey......

    Sometimes I make the actor red square the size you see on your game. But in photoshop I make another box bigger around it an invisible alpha box. So it behaves the same but it looks like the red is just touching edge of grey but the actor is really half over on the purple. You just can't see it. I hope that makes sense.............

    Or an invisible wall actor that you can move over on the grey a little and make a collide rule with that actor not the actual purple wall......

    Someitmes you constrain an invisible actor to moving red actor. One that is farther over that could collide with purple wall......

    Sorry its hard without more info of whats going on and I can't make quick demo right now.....

  • http_gamesaladhttp_gamesalad Posts: 1,340Member

    @gattoman okay the purple actor is just one big actor that covers the whole screen. The purple actor is the "gameover" actor. In my main actor I set up a rule like this Image and video hosting by TinyPic . This is basically saying that if the main actor (red square) goes astray from the grey lines that gameover =1. It works perfectly & it saves a lot of space because before I had spawn actors every 0.2 seconds & it was lagging my game & I had about 30 different spawners. I can give you project itself if you'll like me to. I've been trying to solve this problem since Nov last year.

    If I understand correctly that you're saying that I should make a red actor double or triple the size of the main actor & constraint that actor to the main actors movement?

  • http_gamesaladhttp_gamesalad Posts: 1,340Member

    @gattoman THANK YOU! I SOLVED IT!

Sign In or Register to comment.