Item

create, edit, and destroy items
example:
# create a sword... use 'key' so that item number is returned
set sword [Item create name=sword "at=Somewhere" "offset=100 100" key]
# get its position
set sword_pos [Item num=$sword get_pos]
# destroy it
Item num=$sword destroy


[ name ] [ special_name ] [ num ] [ signal ] [ create ] [ key ] [ destroy ] [ find ] [ keyed ] [ at ] [ in ] [ offset ] [ info ] [ signal_response ] [ get_pos ]

name
Type: String
Default Value: "Item"
Description: the type of item, i.e. sword, torch, etc.

special_name
Type: String
Default Value: "Item"
Description: any special name for the item (usually not used)

num
Type: Int
Default Value: 0
Description: the number of an item that was previously created using the 'key' command

signal
Type: Int
Default Value: 0
Description: send the specified signal to this item. Can be used to signal doors to open, etc.

create
Type: Bool
Default Value: 0
Description: create a new item, see key

key
Type: Bool
Default Value: 0
Description: if 'key' specified with 'create', it returns a number for that item ( set val [Item create key name=sword] )

destroy
Type: Bool
Default Value: 0
Description: destroy the specified item

find
Type: String
Default Value: ""
Description: find a nearby item of the specified type

keyed
Type: Bool
Default Value: 0
Description: can be used with 'find' to specify a specific item... I don't think I need this anymore

at
Type: String
Default Value: "-1"
Description: where to place or move an item, this is a marker on the map

in
Type: String
Default Value: ""
Description: place other items 'in' this item. can be used as a quick way to populate chests/barrels/etc

offset
Type: String
Default Value: "0 0"
Description: an offset to the 'at' location

info
Type: String
Default Value: ""
Description: any special info to be passed on to the item creation. Different items do different things with this info

signal_response
Type: String
Default Value: "-1 \"\""
Description: set up a value/procedure pair, such that when this item recieves a signal of _value_ it calls _proc_

get_pos
Type: Bool
Default Value: 0
Description: returns the position of the item