ID:1631424
 
(See the best response by LordAndrew.)
I have multiple questions currently.
First of all, how would I make a player attack another player by double-clicking the other player?

Second, how would I make a certain variable go down over time (IE. Hunger), and to loop a certain piece of code to check if they have 0 hunger, to make them lose Health. Thank you everyone who responds!

Edit -

How would I make a selection screen for different classes, such as http://www.byond.com/games/bovine_buddy/cowrp ?
Best response
There's a function called DblClick() that you could use for handling attacking. You'd want to do some checks within DblClick() to make sure you're within range of whatever you're attacking, then call your attack function.

Hunger is simple: you can use a while loop to decrement hunger, then do a check to see if hunger is less than or equal to zero. If it is, start taking health away.

The last one, you'll want to use screen objects to build a HUD and utilize Click().
In response to LordAndrew
I do not understand how I would call checks within DblClick.
Would I make a verb IE. Attack, add DblClick(checks), then call whatever the attack does?
But, thank you for responding.
And, may you explain on how I would use a screen obj?
Sorry for being so dumbeh, but I am not the best of coders, I am learning.