OK i'm in blender and i want to make it where if the player hits an object that has a property of lets say "box" then the game can tell my HUD [Heads up display] scene to add +=1 to its property. but i don't want to have to add a lot of logic bricks. iv tried to to use one collision logic brick to see if i could get its property but it didn't work out. here's the code i made
itemType = cont.sensors['itemType']
type = itemType.hitObject
if ['box'] in type:
print("Box")
I tried to print some string to see if it would work but it never would print.
if 'box' in type:.print(type)before youif-statement and let's see the output.typeis a builtin function, you should not replace it.