ID:179743
Nov 15 2001, 10:26 am
|
|
i would like to know how would i go about making an inventory system. i looked through reference and i look through guide and found nothing that would help me. If you could give me some help i would greatly appreaciated
|
Nov 15 2001, 10:37 am
|
|
Easy, you Move() an item to a mob's contents (O.Move(mob)), to add it to the list, then Move() it out to remove it. You can get a contents listing in the statpanels by using stat(usr.contents)
|
In response to GateGuardian
|
|
ok, that didnt help me at all. Ill use an axample.
say the mob wants to pick up an item called shortsword. explain the code so laymen can understand(hence the fact that this is in newbie centeral). And do i have to make a special "inventory" statpanel? |
In response to Selderan
|
|
Selderan wrote:
ok, that didnt help me at all. Ill use an axample. mob Stat() statpanel(inventory") stat(contents) obj/short_sword/verb/pick_up() set src in oview(1) sr.loc(usr) |
In response to Air _King
|
|
Air _King wrote:
Selderan wrote: All of which is in the Guide. Find it at http://www.byond.com/docs/guide/index.html |
In response to Air _King
|
|
thanks alot i appreciate your help
|
In response to Skysaw
|
|
I haven't Seen that in the guide... I checked it like, 4 times to make sure....and anyways, about the "obj/Shortsword/verb/pick_up()
set src in oview(1) src.loc(usr)" code..it gives me and illeagle op. Here it is, "inventory.dm:8:error:src.loc:bad proc Tales of Chaos.dmb - 1 error, 0 warnings (double-click on an error to jump to it)" how do i fix this?? And also, that error, refers to the Last line of that code which is "src.loc(usr)". |
In response to Selderan
|
|
Selderan wrote:
I haven't Seen that in the guide... I checked it like, 4 times to make sure....and anyways, about the "obj/Shortsword/verb/pick_up() oops sorry try this instead src.loc=locate(usr) |
In response to Air _King
|
|
Lol thanks for clearing that up!
|
In response to Selderan
|
|
Look under DM Level 2, Locations.
|
In response to Selderan
|
|
How do i Make the shortSword, appear in my inventory?
|
In response to GateGuardian
|
|
Ok thanks :)
|