Point counting on debug?

I have a property called Points and I selected D so it shows the property while playing.

I linked it to where when the bullet collides with an object, it adds 100 points to the property. But it doesn’t work at all, nothing is added, it’s an INT. Does it matter that the property is on layer 2?

You have the object with the point property on layer 2?

If so, then it needs to be in an active layer if you want it to show, objects in inactive layers will not execute any logic (as that is usually reserved for assets you might later add using the add object actuator)

Also the debug will only show the property for the original object. So if your adding objects onto the first layer from an object on the second layer, the debug shows only the property on the second layer.

How can I get around it so it shows the points?

Attach a python controller so it is triggered when the property is supposed to change, and put this code in the script.

import GameLogic as logic
cont = logic.getCurrentController()
own = cont.owner

print(own["Points"], own.name)
 # the own name is so you can tell which object is being activated

Infininte’s code will show the point values in the console. To enable it, go to the Help menu (unless you’re on Mac).

It won’t allow me to make a new script in the Scripts window, and what do I look for in the help menu to enable?

1, Don’t add it in the scripts window add it in text editor window!
2. I don’t think that it will help you alot if you can see the points in the console and not in the blender window:)
3. If youd uploud the .blend we could help you more :wink:

Nick is right in that the text window is where you should add it, and then use a Python controller to activate the script. To view the console, hit ‘Toggle System Console’ in the help menu (in Blender 2.5).

I don’t have Toggle System Console in my version. Attached is a blend.

shoot.blend (346 KB)

Okay here is the fixed .blend
shoot.blend (480 KB)
everytime the bullet collides with some of the goals they send a message to the camera with the subject 100
when the camera gets a message with the subject 100 it adds 100 to the Property “Points”.
you don’t need the python code anymore.
I also fixed the MouseLook.py so that everything works

I can’t open 2.5, I am using 2.49

Oh sorry i also use 2.49b but i thought you don’t
here the 2.49 file
shoot.blend (347 KB)

The console appears normally on Blender 2.49 - if you’re using Mac, then you have to navigate into the Blender package file, into the .blender file(?), and then start the Blender executable inside of that, if I recall.

One problem, when I shoot the triangles they don’t disappear, they just get knocked off the platform.

Oh yes i thoght it was like this in your .blend.
Just go to layer 2
select the Triangle
go to logic bricks and add an Edit Object Actuator
select End Object and you’re done