ID:175066
 
Has anybody here created or made a Simple CTF snippet? I just need something that will capture flags, a place to turn them in, score, and win. That's it. I didn't feel like tackling something intermidiate-ish now that I'm going back to coding. I'll start with the newbie stuff again.

-Sariat

-PS, I'm making a quick game, should take no more than 1.5 weeks.
Its pretty simple. This took me about a minute to write.


world
name = "Capture the Flag"
view = 6
mob = /mob/player

area
dropzone
var
team
Enter(O)
if(istype(O, /mob/player))
if(O:team == src.team)
for(var/obj/flag/F in O:flags)
O:score++
del(F)
team1
team = 1
team2
team = 2
obj
flag
var/team
team1
team = 1
team2
team = 2

mob
player
Stat()
stat("Name:",score)
statpanel("Flags",flags)
Bump(O)
..()
if(istype(O, /obj/flag))
if(O:team != team)
flags.Add(O)
O:loc = null
var
score = 0
team = 0
list/flags[0]
Login()
..()
team = rand(1,2)