ID:165296
 
I am makeing a game and you will be able to create things by combining them. The problem is that I dont have any ideas of how I should do this. I could probolly code this just need some ideas! Thanks in advance.
Anyone? Please?
In response to Bobomaster
There's many ways, the question is.. how do you want the items to be created/mixed (eg: from an NPC)

Here's... The magic box snippet (note: not guaranteed to work)!

Edit: Tested - does not work.. meh, too lazy to delete it anyways :/
obj/Magic_Box
icon = '?box.dmi'
Click() Mix()
verb/Mix()
set src in oview(1)
if(!(src in oview(1)))return //If the usr is not near the box, it will not open
var/list/L[0] //a list with no values in it yet
while(1) //infinite loop
var/a = input("Please select what you want to add in to the magic box") as null|anything in usr.contents - L
// null|anything will make the cancel button appear and will list everything in the mob. usr.contents - L will take away things already entered
if(!a)break //if there's nothing chosen (cancel pressed or all items are gone), it breaks the loop
L+=a //if a is chosen, it is added to the list
if(L.len<2)return //if the List is less than 2 sizes, it stops the rest from happening
//below is where the fun happens)
if(/obj/apple in L) //if the path is in L
if((/obj/yellow_apple in L) &&(/obj/green_apple in L))
if(/obj/blue_apple in L)
b = new/obj/purple_apple(usr) //creates a new object [purple_apple] in usr's content
del(locate(/obj/blue_apple) in usr)
if(b)
del(locate(/obj/yellow_apple) in usr)
del(locate(/obj/green_apple) in usr)
if(b) del(locate(/obj/apple) in usr)


I don't know if this'll work but it's merely one method of many possible ways... for it is... the magic box!

- GhostAnime