ID:266544
 
I need a code when a player places the flag on a certain turf on there base,one flag has been captured and they can't do it again.And other people can't do it on there turf,they have to do it on there base.How would I do that?

--SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
I need a code when a player places the flag on a certain turf on there base,one flag has been captured and they can't do it again.And other people can't do it on there turf,they have to do it on there base.How would I do that?

--SSJ4_Gohan_Majin


For when a player places a flag on a certain turf, use turf/Entered() to check if it's a flag.

Make a variable to see if the flag has been captured or not.

Make a check to see who's doing it, a variable for each mob.

Give the base areas or turfs a variable to tell who's bases they are. They if the mob's base variable matches the turf/area's base variable, it'll accept.

Just some things to get you started. You'll need to learn to do these things on your own eventually.
In response to Foomer
Heres my code and it doesn't work:
No erros.
    Blue_Step
icon = 'Black Step.dmi'
Entered()
if(usr.teamblueflagplaced<= 0)
if(usr.Team == "Blue")
usr <<"The machine reads your flag!"
usr.teambluecaptured+=1
else
usr <<"You already placed this flag!And do it on your step!"


--SSJ4_Gohan_Majin


In response to SSJ4_Gohan_Majin
Two problems.

1. You still don't know what usr means, and refuse to code any proc without it.

2. You still don't know how to tell people what's wrong. If there is an error, tell us what it is. If there's no error, why are you complaining?
In response to Skysaw
Because it doesn't work.No errors,but I can place the flag over it more then once,thats WHY!!!!!!

--SSJ4_Gohan_Majin