stop creating objects / dejar de crear objetos

0 favourites
  • 8 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I've had to click on the black box the program I create a new object, put it on the screen and I subtract 100 coins

    But now I do not believe me when that object is less than 100 coins

    How I can do?

    He hecho que al pulsar sobre el cuadro negro el programa me cree un objeto nuevo, lo ponga en la pantalla y me reste 100 coins

    Pero ahora quiero hacer que deje de crear ese objeto cuando tenga menos de 100 coins

    �Como puedo hacerlo?

    <img src="http://laneura.usuarios.tvalmansa.com/scirra/1.jpg" border="0" />

    <img src="http://laneura.usuarios.tvalmansa.com/scirra/2.jpg" border="0" />

    <img src="http://laneura.usuarios.tvalmansa.com/scirra/3.jpg" border="0" />

    <img src="http://laneura.usuarios.tvalmansa.com/scirra/4.jpg" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Drag/drop the condition of event 3 in the event 1.

    That would give :

    Mouse: on left button clicked on HOUSE

    System: Coins >= (greater or equal) 100

    --> your actions

  • that's the way correct?

    esa es la forma correcta?

    <img src="http://laneura.usuarios.tvalmansa.com/scirra/5.jpg" border="0" />

  • Apparently it is.

    It means that new house will be created and money deduced from "coins" when the icon house is left clicked AND that coins is greater or equal to 100. (meaning when you have 0 coins, you can't create new houses)

    Was that well what you were asking for ?

  • si, lo que quiero es que me cree una casa cuando tenga 100 monedas.

    Si tengo menos que no pueda.

    yes, what I want is I believe a house when you have 100 coins. If I have unless you can not

  • Does there any way to stop creating objects using system and compare variables? not just like click from mouse...

  • Joannesalfa , you can put a global variable = 10 for example and everytime object created it will substract 1 from that global variable so you will put a limit when the global variable = 0 it will not create object for example : global varibale (createobj) .. so events will be like this :

    event1:

        condition1:system :every x second or everytick

        condition2:system : compare two value --> createobj greater than 0

        action : system :create sprite at random,random

    event2:

       condition1:sprite: is created

       action:system: subtract 1 from createobj

  • Joannesalfa , you can put a global variable = 10 for example and everytime object created it will substract 1 from that global variable so you will put a limit when the global variable = 0 it will not create object for example : global varibale (createobj) .. so events will be like this :

    event1:

        condition1:system :every x second or everytick

        condition2:system : compare two value --> createobj greater than 0

        action : system :create sprite at random,random

    event2:

       condition1:sprite: is created

       action:system: subtract 1 from createobj

    Sounds good, i'm going to try this one.

    Thanks!

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