ID:143170
 
Code:
mob
proc
LoadCharacter()
var/savefile/F = new("players/[src.ckey].sav")
var/X
var/Y
var/Z
var/mob/newmob = new()
F["name"] >> name
F["X"] >> X
F["Y"] >> Y
F["Z"] >> Z
F["Mob"] >> newmob
newmob.loc = locate(X,Y,Z)
newmob.client = src.client
checkverbs()
return ..()
mob/proc
checkverbs()
world<<"meh"
var/mob/P=src
P.verbs+=/obj/item/verbholder/verb/Pow
if(src.species=="Muul")
src<<"aksdfkjsa"
mob/verb/givepow()
set category="Action"
var/mob/P=src
P.verbs+=/obj/item/verbholder/verb/Pow

obj/item/verbholder/verb
Pow(mob/M as mob in oview(1))
M.HP -= 100
M.DeathCheck()


above the load proc won't execute the checkverbs() proc properly, it stops once it gets to the if() and the verb add part or either depending on how I put it in, I'm just trying to get this to work so I can put what I need into it. Anyhow I want to create conditions where when met will give certian verbs to the player at startup, I can do it if it's a verb but not if it's a proc triggered in the load proc for some reason one of these things where it seems like it should work yet doesn't. I've spent so much time on this it's killin me now. QQ

Mike-


I'm having trouble reading what you are trying to say.

Why do you do that "var/mob/p = src" stuff? Would something like this work? It looks you have some funky spacing after " world<<"meh" ".
mob/Login()
..()
checkVerbs()

mob/proc/checkVerbs()
if(src.race=="Something")
src.verbs+=/mob/verbholder/verb/Run
else
src.verbs+=/mob/verbholder/verb/Dance

mob/verbholder
verb/Run()
src<<"Oh no! It's the cops... Run!"
verb/Dance
src<<"Foxtrot!!!"


But I think your biggest problem is that you don't call newmob.checkverbs(). I think it is calling it up for the old one ("checkverbs()" defaults to "src.checkverbs()", while src is the placeholder mob that'll get trashed in a moment).
checkverbs() is not executed properly because it is being executed for the mob which was JUST discarded. Change checkverbs() to newmob.checkverbs().
In response to Garthor
Tried that already didn't work then not working now.

mike-
In response to Kichimichi
woot got it working finally, so long in the coming the relief is... great.

there my janky verb saving system will work now just have to have a zillion vars for my chars ahh good times, actually it's a fairly easy boolean system. Equipping item adds verbs and a sets a var to 1 unequipping removes verbs and sets var to 0 at login it checks those vars and adds verbs for the ones that are 1.

just out of curiosity how bad is this system? drawbacks to it?

mob
proc
SaveChar()
var/savefile/F = new("players/[src.ckey].sav")
F["name"] << name
F["X"] << src.x
F["Y"] << src.y
F["Z"] << src.z
F["Mob"] << usr.client.mob


mob
proc
LoadCharacter()
var/savefile/F = new("players/[src.ckey].sav")
var/X
var/Y
var/Z
var/mob/newmob = new()
F["name"] >> name
F["X"] >> X
F["Y"] >> Y
F["Z"] >> Z
F["Mob"] >> newmob
newmob.loc = locate(X,Y,Z)
newmob.client = src.client
newmob.checkverbs()
return ..()

mob/proc
checkverbs()
if(src.phyblast==1)
src.verbs+=/obj/item/Inventory/Equipment/Weapon/Keyfinder1/proc/Phyblast
In response to Kichimichi
F["Mob"] << usr.client.mob

That should be src.mob.