In response to Nexus6669
Hmmm... I know that the problem is that you need to somehow show that u are changing the objs state not the mobs. BUt unfortunately i cannot figure out how to do this. From all my understanded making an absolute path to the objs state should've worked but, even through my own testing, it doesn't. Im sorry i cant help u.
In response to Self Scientific
...okay, time for me to help out

Read the comments because I won't bother fixing it up for you:
mob/Move()
if(lifting)return 0
return ..()
obj
Test_Tube
icon='Test Tube.dmi'
icon_state="weights"
layer=MOB_LAYER+1
verb
Lift()
set category="Action"
set src in oview(0)
if(usr.lifting == 1)
return
if(usr.lifting)//What is the point of this when the above line stops this from occuring if you are using ==1/0 for true/false... get rid of one of them
usr.lifting=0
icon_state="weights"
//should add return here unless you want it to continue
if(usr.stamina <= 0)
return //Since this stops the rest of the code from happening, you do NOT need the else below
else
usr << "You start lifting"
icon_state="lifting weight"
usr.lifting=1//ha HA, Read the very first comment, bet that's the main problem right there :)))
usr.stamkilla()

mob
proc
stamkilla()
if(usr.stamina <= 0)
/obj/Test_Tube.dmi.icon_state = "weights"//Read above, this line is useless... the reason why you got the error is because the 'var' before /obj is missing... and this wouldn't work straight away anyways, you need to define what the object is in reality AND at the next line change the icon_state... read the DM guide, please
usr.lifting=0
return
else
var/random=rand(1,2)
var/stam=rand(5,10)//you can make one 'var' and indent all the vars underneath it.
usr.strength+=random
usr.stamina-=stam
sleep(10)
stamkilla() //Ummm, why you calling this proc? just make the whole thing while(1) and when it's done, call 'break', which should be when stamina=0


A problem that I could see happening is that Stamina CAN become like -3... here are some link of interest that I insist you to take your time and read:

Boolean

min()/max()


Actually you don't even need a seperate proc for stamina drain... if you use while(1) in the verb with the info, it'll be all the more easier for you since you don't have to define the object... and using src instead :D

- GhostAnime
In response to GhostAnime
Ok the reason for "if(usr.lifting)" this was because I made a movement var, so it would freeze the character whilst liifting..
In response to Nexus6669
What I meant in that post is that both if(usr.lifting==1) and if(usr.lifting) are the samething... get rid of one and join it together cuz with the currect way, if it's 1, the code would stop before reaching if(usr.lifting==1) because of the return at if(usr.lifting)

- GhostAnime
In response to GhostAnime
Ahh I see, I shall give it a whirl...
Page: 1 2