Hi I'm new to programming and i am stuck while coding that my actor is moving edge to edge while randomly shooting bullets.
I have the moving figured out and i saw a code on how to make objects spawn randomly at a certain location but i want them to spawn where
my actor is at that moment. Can you help me out? Thanks!
private int spawnCounter = 0;
That's the code for spawning objects at a random time but how to i replace the (X, Y) with the coordinates my actor is ?
public void act() {
if (spawnCounter > 100) {
spawnCounter = 0;
addObject(new YourObject(), (X, Y);
}
spawnCounter++;
}

