Creating objects within the game.

Jsimmons
15 Apr 2012, 22:55
Okay, so, I've been trying for a long time and I've been unable to figure out how to make a "Replicator" to create usable items within the game.

sgreig
16 Apr 2012, 06:42
You could either create all of the items in advance and then set up a script that moved them into the room when you interact with the replicator. Alternatively, you can script it to create the objects automatically, but that's more complicated.

Jsimmons
02 May 2012, 02:29
the complicated one is the way I cant figure out. Any help?

I dont want to spend hours coming up with whatever the player might want to replicate.

Pertex
02 May 2012, 06:38
You can use the "clone object and move" command: http://quest5.net/wiki/CloneObjectAndMove

sgreig
02 May 2012, 08:30
Well, even if you were going to have the game create the objects automatically, you still have to determine what items you want the player to be able to create. Say for example you wanted to the player to be able to create an apple, you would use something like this:

create (apple)


And then once the apple is created, you would have to set all the different variables you'd need like the alias, description, etc.

Honestly, it's probably easier just to create the objects in advance unless there's some reason you have to do it this way.

Pertex
02 May 2012, 10:49
But Jsimmons wants to create a replicator, so there should be an existing objects which should be replicated. So why not cloning this object?
And what will you do if the player wants to replicate lots of apples? Creating 100 appleobjects in advance? And this for every object that can be replicated?

sgreig
03 May 2012, 07:44
Pertex> I can't see any situation that would necessitate a player to replicate an item 100 times. That seems really excessive. And not only that, any time you tried to use an apple, you'd get a dialog box listing however many of the objects you'd cloned. It would gobble up lots of memory and make the game kind of frustrating imo - and that's all assuming Quest wouldn't start to bug out with that many items cloned.

Jsimmons
12 May 2012, 03:05
the problem I have with this is that I want to have the created item have a use and a description, but I want to have a script run so that the player at least has a choice of what to create. The word replicator is a mislead. I dont want to make doubles of objects, I want to create new ones in-game.

sgreig
12 May 2012, 14:15
Yeah, the easiest way it to create the objects in advance, and then either move them to the room or to the player's inventory when they use the machine. You could create them with scripting, but it's a lot more complicated. :)