ID:161279
 
Well I've been asking for a lot of help lately and I'm thankful for it. I couldn't find how to do this anywhere and I've been trying for about a half hour to get it working but I'm missing something but can't figure it out.

Well the effect I want to get is when anyone enters the Capture the Flag event we have on the game a var gets changed to = 1 so

modplaying = 1 when entering the event and it works fine but now I need to block verbs but that isn't working for example.

In the teleport verb I tried adding an if statement

if(usr.modplaying==1)
usr<<"CHEATER! You can't teleport while in CtF!"
return

So that's what I put before the activating code where it teleports the player trying to halt it but it isn't working. Does anyone know what I'm doing wrong?
To do it they way you want, modplaying should be a global var, not one for mobs.

/var/modplaying=0

/mob/verb/teleport()
if(modplaying) return


However, this wouldn't be the best way to do it, as it would be nice if the verb disappeared completely.
/client/proc/startCTF()
for(var/mob/M)
M.verbs-=/mob/verb/teleport
In response to Nickr5
Nickr5 wrote:
However, this wouldn't be the best way to do it, as it would be nice if the verb disappeared completely.
> /client/proc/startCTF()
> for(var/mob/M)
> M.verbs-=/mob/verb/teleport
>


So, if I did that for all GM verbs it would take them away I see that but to change it back to getting them when leaving would it be

/client/proc/endCTF()
for(var/mob/M)
M.verbs+=/mob/verb/teleport
In response to THESINKING
Ok, so I came up with this.

client
mob
proc
mobplaying()
if(usr.fireteam==1)
for(var/mob/M)
M.verbs-=/mob/verb/goto


But I keep getting an undefined type path for
M.verbs-=/mob/verb/goto
In response to THESINKING
You have a verb named goto()? I don't think that's allowed. Goto is blue becaues it's a reserved word.
In response to THESINKING
There are other, more important problems with that code than what that error says... you should scrap it ASAP.
In response to Chessmaster_19
I see but I also come up with the same error when I change goto to summon. Both are verbs in the game. I'll change the goto one though ASAP.