This site requires JavaScript, please enable it in your browser!
Greenfoot back
Prummi
Prummi wrote ...

2021/7/4

How can I spawn a Object on another Object

Prummi Prummi

2021/7/4

#
In my game I have a actor and 2 Objects. When my actor is touching the first object it gets deleted and the second object should spawn at the exact same Position of the first Object(current position of the actor). How can I spawn the second Object at the same position where my actor is?
danpost danpost

2021/7/4

#
Prummi wrote...
How can I spawn ... Object at the same position where my actor is?
getWorld().addObject(new ObjectName(), getX(), getY());
You need to login to post a reply.