ID:176464
 
I ran my game for the first time online and something doesn't work right.

Here's the code:
verb
Raise_PL()
set category ="Training"
pl += 10
if(pl == 1020)
verbs += /mob/proc/Ultimate_Attack
world << "[usr] now know the Ultimate Attack."
if(pl == 1100)
verbs += /mob/proc/SSJ
world << "[usr] learns about SSJ transformation."
if(pl == 1200)
verbs += /mob/proc/SSJ2
world << "[usr] learned SSJ2."
else
world << "[usr] has gained 10 pl."

Basically that raises the user's PowerLevel. Once the powerlevel is 1100 it calls the proc "SSJ". The coding for that is:
mob
proc
SSJ()
set category="Tests"
usr.icon_state = "ssjgoku"
overlays -= /obj/overlay/lightning
world << "[usr] tranforms into ssj....kinda...."

That should transform the user. But the problem is that when I play online the only person that gets the "SSJ" proc is the first person to get to 1100PL. I want it so EVERYONE who gets to 1100PL gets this new verb.
Uhhh, I dont understand why your adding a proc to the src's verbs....?
In response to Jotdaniel
Jotdaniel wrote:
Uhhh, I dont understand why your adding a proc to the src's verbs....?
Ok, I have a verb, Raise PL, and it raises the PL of the user. Once your PL reaches 1100 it should add the verb SSJ. Am I adding it wrong? How should I add it?
use usr.pl or src.pl
You're using usr in your procs. Don't.

Dream Tutor: usr Unfriendly

Lummox JR
one i think you should put
        verb
Raise_PL()
set category ="Training"
pl += 10
if(pl == 1020)
verbs += /mob/proc/Ultimate_Attack
world << "[usr] now know the Ultimate Attack."
else if(pl == 1100)
verbs += /mob/proc/SSJ
world << "[usr] learns about SSJ transformation."
else if(pl == 1200)
verbs += /mob/proc/SSJ2
world << "[usr] learned SSJ2."
else
world << "[usr] has gained 10 pl."
In response to Koolguy900095
Well, I did all you guys mentioned.

- Made the statements else if() like koolguy said.
- I used src. now.
- I changed the pl to src.pl

And it still doesn't work online. It only allows me to transform because I'm the first one to it.
In response to Jotdaniel
Because verbs are procs that are in the datum.verbs list and nothing more.
In response to Mli0
try usr.PL if src doesnt work but if it still has the problem change it to src again...
In response to Garthor
Garthor wrote:
Because verbs are procs that are in the datum.verbs list and nothing more.
I really have no idea what that means. Could you tell me what I should DO?
In response to Mli0
Yes. Tell us what the verb belongs to.
In response to Garthor
Garthor wrote:
Yes. Tell us what the verb belongs to.
What do you mean? The verb Raise_PL() belongs to the user's mob. The verb SSJ and those other procs belong to just some new mob I created....The coding is:
mob
proc
Ultimate_Attack()
set category ="Attacks"
world<< "[usr] uses the ultimate attack."
proc
SSJ()
set category="Tests"
src.icon_state = "ssjgoku"
overlays -= /obj/overlay/lightning
world << "[usr] tranforms into ssj....kinda...."
proc
SSJ2()
set category="Tests"
src.icon_state = "ssjgoku"
overlays += /obj/overlay/lightning
world << "[usr] tranforms into ssj2....yaaaay...."