How to create a checkpoint gate point score system?

Hi,

I’m new to unity and have to make a game for my university course which is due in next week.

The game I’m making is flying game where a plane flies through the city going through point gates (sortta like GTA V races if you’ve played them). So do you have any idea how to script it? I assume there has to be some sort of collider on the gates but have no idea where to start when coding it.

Any help would be greatly appreciated!

Thanks

Chris

Hey

It’s definitely worth having a look at the tutorials especially http://unity3d.com/learn/tutorials/projects/space-shooter/explosions

It goes in to depth as to how colliders work, especially the trigger type.

Hello, its not difficult. I would use this script:

JavaScript:

#pragma strict
var spawnPoint : Transform;

function OnTriggerEnter(other : Collider){
if(other.tag == “Player”){
spawnPoint.position = Vector3(transform.position.x, spawnPoint.position.y, spawnPoint.position.z);
Destroy(gameObject);
}
}

Thanks but I don’t want to destroy anything I just want the plane to fly through the gate and add 1 to the score.

Oh, i thod you wanted something like checkpoints. I mean, so when you die that, you dont have to play again. You just start from your last checkpoint. That script is simple and easy for checkpoints. For score, i think you should just check this.

This one should help you whenever you past your wanted area for points:

And here you can add text:

1 Like

Thanks, I’ll give it a go tomorrow