End a game (win conditions) -solved-

0 favourites
  • 5 posts
From the Asset Store
Check preview, download and add value to your games.
  • Hi,

    I'm creating -lets say- a space shooter game. and i want to end the game when all ships on the screen is destroyed by player. to achive that i've tried to use ship is on-screen option but it seems like this condition is for the actual object not its' instances. so what should i use for it?

    i'm a newb. sorry if it's an easy question.

  • use the "compare two values" system condition and use the 'ship.count' expression for the first value.

    if ship.count = 0 then ......

  • im kind of trying to do the same thing, i want that when there is already a shotgun in the map no new shotgun will be spawned.

    http://dl.dropbox.com/u/58024177/shooter2.capx

  • use the "compare two values" system condition and use the 'ship.count' expression for the first value.

    if ship.count = 0 then ......

    thank you sir!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • spexel: this is not relevant to this topic.

    But anyway:

    dd a condition to your event 10

    System: compare two values

    Compare Shotgun.count = 0

    For this to work you also need to add a shotgun.destroy in start of layout (event 9)

    Also in your event 10 you use a random function.

    This means that every tick, this value gets changed. You probably should rather use a global variable, and assign it in the action of event 10, not in the conditions of event 10

    (each time event 10 gets executed, you set the next random time a shotgun will spawn).

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