Counter check if hit and one pointed added once


I’m trying to create a counter, I have one working, how ever I want to be able to have one object hit another, and the point remain as 1 added to the counter.

I used borncg tutorial to assist me with this. But that doesn’t go into detail on how to check that an object has been counted once hit and only once, so not just hit once, and then adds one, and then again and then one more point

As well, if there aren’t enough points and the timer runs out, means end game.

Thank you.

You start with “countable objects”

The hit object will not be countable anymore.

when hitting a countable object you increase count (and see above - ensure the object is not countable anymore).

again what?

Why one more point? you said earlier you want to count them just once.

Countable objects

There are many options. Here are some:

  • when the countable object is hit, remove it (optional replace it with a non-countable object)
  • an object is countable when it has a certain property - remove the property to turn it into non-countable
  • an object is countable when it has a certain property with a certain value - change the value turn it into non-countable
  • create a list of countable objects - remove an item of the list to turn it into non-countable
  • create a list of non-countable objects - add to the list to turn it into non-countable

I think he means something like this monster ->


Here this image displays the program, and the clip below is what happens.


I do not get it. These boxes are flying sidwards away?

When should the counter increase? What happens with the boxes after you get the point? Can you get a point from the same box?

Press w to move forwards.Press s to turn.Look at my logic bricks setup.Try to figure it out
by yourself.Try more than once.Show me what you tried.I want you to learn this.
I am doing this because he has not learned how to use logic bricks completely.I have fixed
most things to do with logic bricks on his incomplete videogames.


untitled.blend (491 KB)

I’ve viewed the file, what exactly is the change?

The whole setup is a point score game, with a timer. So the player must knock down the objects and get a point from each object. All that happens with the setup I have is points just keep adding when bumping into the objects.

You mean they wont stop/

So once I bump into an object, I don’t have to hit it, but either way, the points just add up.

But the subject of hitting, bumping in isn’t much of a challenge either.

Maybe some could add and some could subtract.If you don’t have enough points you lose.But you do not know which ones add or subtract.

Maybe we can checkout my file from blendswap

Its a point scoring game, we all know what they are. The question how to program using those bricks is the challenge here that I don’t know how to do obviously. And there aren’t any tutorials on the video site.

Considering how much effort must go into a game, talent, skill etc even money, I don’t know what more I can do besides a mini game like this, and continue to edit the LIS project I have done, who LS helped me with the programming, as well the other user who help me with the demo, theoldguy.

That is all that enters my mind for solo game creation, with the help of a programmer in the bricks when I can’t work it out, A good knowledge of python is crucial and if not that, the other skill needed for it.

I was thinking, you know, may be a Robo cop game(played the xbox copy a couple of years ago, absolute rubbish), how would I create that, I can’t, even to create that figure I would use the simple person I got from blendswap which I used for Major West. That is free to use for commercial or free. But like with using official content publicly as the problem I ran into with New Line Cinema for LIS, they wouldn’t let me use one audio recording for free or paid. So anything film inspired must be originally made.

When i began the LIS a year back, when I first inquired, here I wasn’t sure what was possible, but now I see the limits with the game engine, more so with lack of own talent, and the need for a team to do anything impressive, for free or side loose change donations.

I thought about may be a collaborate project on here for LIS, with the spider battle scene in the film, but so far I’ve decided to keep at it myself, as for textures for a spider, well I can’t publicly release it, but may be using actual model for textures.

How do I create burning through metal, then explodes, then blood effect, nice textures for the metal walls of the scene area. Almost like an AAA game. But just one scene.(which I have tried using some tutorials, but one requires some python code, I just switched off from that)

My blend did not help you.I think you need try harder.

It didn’t, I could see it is a state brick program, that is the only difference.

I thought may be a property brick is needed for some kind of check counter, so one object is one point, and that is it once hit and it falls.

My blendswap file is a pickup system that handles many pickup types including types with a max value (like health or ammo) another type actually changes max health etc.

Please at least check it out,
This is why I wrote it*

There does not need to be any logic in the pick up object at all, just a few properties, so this scales much much better.

(one player running logic vs thousands of pick up items)

Where is it? I’m using 2.76, is it using bricks? I guess not.

It uses

Collision-------------python controller(this script)

Collision sensor gives you access to

import bge
cont = bge.logic.getCurrentController()
own = cont.owner

#own is the gameObject running the script

Collision = cont.sensors['Collision'] 

#this is the sensor connected to the python controller

if Collision.positive:
    # you hit something
    HitObjects = Collision.hitObjectList
    for object in Collision.hitObjectList:
        #object is who you hit
        print(" bumped into "
        if "property" in object:
            #we can filter what to do to objects based on properties in objects
             Value = object['property'] 
             #this is the value of the property we made sure existed

This is a basic python script

Take a look at it

Python enhances the bricks, it does not replace them

I love the logic bricks

I made a simple shop keeper blend for you.Study it and try reproduce it.
W to move forwards and c to rotate.Bump into rectangle see what the shop keeper says.But into the cubes to collect the money.Then bump into the rectangle and see what it says.
Maybe i am not understanding you.
But here is a blend.You could modify it to do what you want.


untitled.blend (509 KB)

here is a blend that does what you are asking for in post #1
it has a few box and when you shoot a box it is counted and if you shoot the same box again it is not counted

only logic bricks are used.

hope it helps

^Thank you, all my problem was, was a few missing bricks, property ones. Now one object is one point once hit.

I wanted to inquire, is using real products/images fine? I took a few snapshots of my old system, well the one I’m using for the game engine. Its a dell system. I can’t use cola, since the official image of one is copyright, but taking a snap of a cola can shouldn’t be a problem.