Score


(xintoc) #1

I have this problem,

I want to make this:
Let’s say that I have a sphere with arrow controll, a cube that isn’t moving
and a Text that shows ‘0’.
Now what I want is when I move the sphere and it touches it
it adds the text 1.

How to do that? I have whached other games but I still can’t get it…


(jrt) #2

Assuming your Text object is a proper Text object with a property named ‘Text’

Give it an always sensor and link it to a property actuator, set it to copy a property from the character object(call it say, ‘hit’) to it’s own ‘Text’ property.

Put a property on the character called ‘hit’.

Put another property on the cube.(say, ‘cube’)

Put a collision or near sensor on the character, set this to read ‘cube’ in the property line, Then link this to a property actuator, set this to add 1 to the ‘hit’ property.

This will add 1 to the property ‘hit’ and the Text object will copy this to its ‘Text’

If you have any problem with the Text object, just append one from someone else’s game.

Hope this makes sense! It’s hard to explain in words with no pictures.

There should be a tutorial for it somewhere but I can’t remember where.

jrt.


(jrt) #3

Sorry, forgot to say that for the purpose of adding whole numbers you need to use an ‘int’ property.

Don’t think I’d make a tutorial writer just yet! HEHE!

jrt