ID:148253
 
Hello.. I was wondering if anyone could help me out with this coding problem I have.. I want to make it so if you click on a mob, their name will change.. this is what I have so far, but it doesnt work..

TheWatcher
icon = 'mobs.dmi'
icon_state = "Sameoldiconstate"
proc/namecheck()
if(usr.roll == Jimmy)
if(istype(src, /mob/other/Mobgoeshere))
src.name = "Jolly Fooz"
else
src.name = "Jimmy Glicking"
Click()
usr.roll += Jimmy


Thanks ^_^
Wierd names in the code :)

~starwarspower~
MaNiAcK wrote:
Hello.. I was wondering if anyone could help me out with this coding problem I have.. I want to make it so if you click on a mob, their name will change.. this is what I have so far, but it doesnt work..

Click()
usr.roll += Jimmy

Right now when you click, that line is the only thing that happens. You probably want to have it also call the namechange() proc.

[There are other problems too, but that's the starting thing to fix.]
In response to Deadron
Alright.. Deadron with a little advice from meh bro Dracon.. I revised meh coding to look like this.. check it out:

TheGreatGazoo
icon = 'mobs.dmi'
icon_state = "Sameoldiconstate"
New()
usr.namecheck()
Click()
knownpeople += "This Guy"

mob/proc/namecheck()
if(findtext("This Guy",knownpeople)==1)
if(istype(src, /mob/other/TheGreatGazoo))
src.name = "PaulRicko!"
else
src.name = "Jesus"

var/list/knownpeople = list()


but the name of the character already pops up as "PaulRicko!".. any guesses as meh problem, Deadronny? ^_^