Hey all,
Need some help with how I can program the following:
What I want is that when my player moves over a lever object the movement speed of certain "bolt" objects gets edited from 5 to 1. The way my scenario currently looks is this:
(disregard the sprites I used, no inspiration lol)
I have tried many ways but all to no avail.
My bolt class:
Lever is currently empty (except an empty Act method anyway). Same goes for Player for as far as this problem goes. (there are many other methods that deal with completely other things there)

public class Bolt extends Actor { public int boltspeed = 5; /** * Act - do whatever the Bolt wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { move(); } public void move() { //moves bolt from bottom-right to top-right if(getX() >= 75) { setLocation(getX() + boltspeed, getY()); } //moves wallmaster from top-right to top-left // Actor Bolt; if(getX() == 165) { World world = getWorld(); world.removeObjects(getWorld().getObjects(Bolt.class)); world.addObject(new Bolt(), 75, 375); world.addObject(new Bolt(), 75, 405); world.addObject(new Bolt(), 75, 435); } } }