Compare the number of objects

This forum is currently in read-only mode.
From the Asset Store
Jump on numbers in the proper order and reach the sun!
  • How do you do this in Construct? I don't know, even after using it for so long, I still have trouble finding things in the event editor since I am so used to the way Clickteam products are laid out (even though I haven't used a CT product in a long time).

    I'm trying to make it so that the player can only fire a bullet object when there is less than three bullets on screen.

    In, say MMF or The Games Factory, for example. I would do this by

    (Condition)

    Upon pressing "Z" key

    + Number of "bullet" < 3

    (Action)

    Create "bullet" at "player"

    But I can't seem to find the thing that counts (compares) how many objects are on screen. Where is it in Construct?

  • Just use compare under System and use object.Count where object is the name of your whatever.

  • "Get number of objects" can be used in any expression, not just system compares. You access it from any expression editor by clicking on the object you want to count.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "Get number of objects" can be used in any expression, not just system compares. You access it from any expression editor by clicking on the object you want to count.

    I know that, I'm just saying for his particular example

  • > "Get number of objects" can be used in any expression, not just system compares. You access it from any expression editor by clicking on the object you want to count.

    >

    I know that, I'm just saying for his particular example

    I know that too, I was just telling machrider, and other people in general who might be reading this thread

  • Okay, thanks. Yeah, I wasn't checking under system, I didn't expect it to be there. I was looking under the object itself because MMF/TGF and other CT products usually have the compare condition listed there. Old habits die hard, I guess.

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