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

2015/12/8

Change Variable of Another Actor

Woollen Woollen

2015/12/8

#
Hi, I am trying to change the speed int of an actor from a different actor. How would I go about doing that?
danpost danpost

2015/12/12

#
Assuming a Whatever actor is in the world:
Whatever actor = (Whatever) getWorld().getObjects(Whatever.class).get(0);
actor.speed += < change in value >;
You need to login to post a reply.