Capture the Flag

Hey guys I have a question, I am working on a map that is made for capture the flag and need a start point. I am pretty noobish with scripting even though i have done tutorials and watched vids and experimented but outside of anything basic I am lost. I am a artist first.

Can someone please help me out with this.

What exactly do you need help with? If you can ask some specific questions, you’ll likely get some helpful responses.

I agree with jgodfrey, you need to give more details. But i think you will need to take a look at how triggers work because i think you will need to have a trigger point at your flags and if someone/other players enter that trigger zone, starts capturing or something like that.

And i think you might need some sort of AI codes if not this might be a multiplayer game. And if so, might need to work on some form of networking.

A more direct question would be how do I setup a flag to be picked up and placed at another base? Do I destroy the flag once the player enters the trigger? What method should I use to write a script for the bases. The flag is going to be dropped if the player gets killed and will remain there until the the team reclaims it or the other team recaptures it. Once the captured flag is taken to the opposing base they are awarded one point and the flag is returned.

Is that clear enough?

well it isnt very hard so ill explain some of the key things.

The picking up of the flag:
Basicly you could make a new boolean variable in your player script and on enter of the colider set it to true.
When you go back to your base and that var is true you get a point or whatever and your boolean is set to false.
Also when you enter the colider of the flag you have to destroy it so you would do that on the flags code with destroy(this.transform.position).

When killed:
When you are killed just instantiate the flag ,respawn the player and then set its boolean value to false.

Now this doesnt answer all of the question you have but it should get you started :smile:

-Anthony Faraci

Thanks, I will pay anyone who is able to set this up for me.

any more responses?

anybody even attempted this yet? I see there has been no responses…

You really should try this yourself. The code really isn’t that hard in the end.

I prob will, its one of my old post. Old school project. Actually that Uscript looks like a better option for artist like me…

You can try it out now for free since now it is in beta. :smile:

hey can someone help me I am doing Capture the flags but I need a script that will allow the 2 teams red and blue to capture the flag
:slight_smile: