ID:158540
 
ok so how would i make it so that somebody could walk up to a treasure chest and take a sword from it?
I've already created a chest and have edited the contents so that it contains a sword,how do i make it so that a player could take the sword?
Plz reply...?
obj/chest
var/obj/chestcontents=/obj/sword
//modify this in the map editor to contain the path
//(right click the object and hit "Edit" on the chest
//and type in the typepath you need for the chestcontents part
//of whatever you want to spawn /obj/sword will be used for this
verb/open()
set src in oview(1) //if your within 1 tile
new chestcontents(usr) //create a obj of the same type as the src's chestcontents in the usr
In response to Jordan1794
We all quite obviously live in the same timezone as you, so we can quite obviously help you in less than 15 minutes.
In response to Demon_F0rce
I'm sorry Demon, but that was just stupid. This is a How-To board, if your going to include a sarcastic remark like that, try to help to? (assuming it isn't a help vampire request)
In response to Vic Rattlehead
I just find it annoying when people post something up, then 5 minutes later bump the topic.
In response to Demon_F0rce
Lol didn't mean it as a bump,i meant to add it to my first post and it messed up and didn't show up so i added it in a second post...