View Full Version : Duplicating objects IN game
fiskr
11-03-2011, 12:04 PM
Hello! My question is short, and hopefully simple.
How would one write a method that duplicates an object upon that object being clicked during the game or run-time?
Thank you for your time.
dakota95
11-03-2011, 12:49 PM
As far as I know you can't. What you could do is make two of something and set them to move together. Then you can say "when clicked on" the first one the second one moves away from the first.
sorry if it didn't help
fiskr
11-03-2011, 12:55 PM
I am trying to split any one object into two identical, cloned objects- the two cloned objects manifesting from the one into positions relational to the one.
GameKid
11-04-2011, 05:36 PM
There is no way.... You add objects before and only before running the world.
If there were, you would need infinite objects to take the place of a clone, thus crashing alice upon open.
Sorry, but no.
Centuri0n
11-04-2011, 10:27 PM
The only way i could think would be to duplicate the object but not move it, giving the appearance of one thing. Or just make
[[world function]object 2 [is showing=false]]
[if mouse is clicked on object 1]
object 2 [is showing]=true
im not sure if this helps, but it is what i used to spawn additional enemies in my fps
arty-fishL
11-05-2011, 04:02 AM
There is no way that you currently have access to, but with a few modifications... take a look at my thread here (http://www.alice.org/community/showthread.php?t=6831).
Mr Kidnapper
11-05-2011, 11:58 PM
By the way, did you ever fix that problem where it clones +1 each time I press play?
arty-fishL
11-06-2011, 05:28 AM
By the way, did you ever fix that problem where it clones +1 each time I press play?That problem was probably something to do with the actual built in code of the cloning function, hence they left it out, but I never took this any further anyway.
Lenora
11-07-2011, 07:15 PM
Hi I am a noob to Alice 2.2 and I need to make a bottle of water for a world. How do I make this?
InsertName
11-11-2011, 12:54 PM
You go to items and pick the water bottle