i am trying to create a sphere that when my character touches it it dies/respawns from the starting place, level isnt restarted. im trying to make it so that these spheres can only be touched 3 times throughout the whole game and on the fourth touch its game over. please could someone help me with my coding? as im getting no where
There are several ways this could be accomplished, depending on the rest of your game. Here's one simple way....
Here's a script to attach to your player GameObject:
Here's a script to attach to your sphere GameObjects:
answered Nov 23 '10 at 03:25 PM