Games
Developers
Forums
More
BYOND
Download
Developer Guide
Developer Reference
Support
Terms of Service
Membership
Contact Us
Many features on this site require JavaScript. Please enable JavaScript support in your browser.
Register
Login
BYOND Forums
Announcements
·
BYOND Help
·
Bug Reports
·
Feature Requests
·
Beta Testers
·
Beta Bugs
·
Developer Help
·
Design Philosophy
·
Demos & Libraries
·
Tutorials & Snippets
·
Art & Sound
·
Classified Ads
·
Game Updates
·
Contests & Events
·
Linux Talk
·
On Topic
·
Off Topic
Question about inventory....
[Tips]
ID:176842
Dec 3 2002, 5:20 pm
Koolguy900095
How do you make it so when you use a verb the item disapears after?
This is the code im using
Eat()
src.hp+=20
usr <<"You eat your herb and gain 20 HP!"
Dec 3 2002, 5:26 pm
Mrhat99au
Eat()
set src = usr.contents
if(usr.hp+20>usr.maxhp)//if usr.hp goes over, just set it to maxhp!
usr.hp = usr.maxhp
else
usr.hp+=20
usr <<"You eat your herb and gain 20 HP!"
del(src)
Dec 3 2002, 5:36 pm
In response to
Mrhat99au
Koolguy900095
thanks
Copyright © 2025 BYOND Software. All rights reserved.
set src = usr.contents
if(usr.hp+20>usr.maxhp)//if usr.hp goes over, just set it to maxhp!
usr.hp = usr.maxhp
else
usr.hp+=20
usr <<"You eat your herb and gain 20 HP!"
del(src)