Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Capture the Flag concept script help?

Asked by 5 years ago

I needed help with scripting a flag for CTF. The concept is basically, if the other team conquers the flag // stands on it for about 7 seconds, the flag changes to their team color, but only if all enemy team opponents aren't on the flag, and if the other team holds the flag with none of the other team around, it's theirs, and they gain points from it on the leaderboard for their team. If you know how to do this, it would be great showing me how.

Thank you!

1 answer

Log in to vote
0
Answered by
xg1y 41
5 years ago

This is rather simple, what you'd do is detect if a player is within a certain radius of the flag pole eg; 6 studs (using magnification) then if a player of a different team colour is detected to be in the same area, then they can't 'capture' it. Then say if the player stays within the area for a certain amount of time (without another team's player in the area) condition a reward/round reset/score awarded?

If you need any links to resources, just let me know and I can't link you to stuff.

0
Please link me some resources of how to do this. It says "Just let me know and I 'can't' link you stuff" As I'm assuming that was a mistake. What I'm trying to do is however long a team member is in the radius of the 'capture' (without enemy team there.) And if they stay there for a few seconds the colour of the area changes to that team color (aka flag colour.) If you could let me know how to do- MrMultiMusic -9 — 5y
0
-This it would be greatly appreciated. Thank you once again! MrMultiMusic -9 — 5y
0
Thanks, it's a bit confusing but I'll try to manage, cheers mate! MrMultiMusic -9 — 5y
Ad

Answer this question