This code allows objects (monsters / collectables / animations) to be moved manually around the screen during an activity. It works well when used with a 2-player activity. Select an element. Right click on it then click on the green rotation arrow below the image to view the animation options that are attached to the apple. Click on the red fish (for animation settings) and click on the "adv" option. in the script box that appears, enter the following code;
if(Key.isDown(65)==true) { this._x +=1; }
the codes for all keys are: A (65) - Z (90) / 0 (48) - 9 (57) / left (37) / up (38) / right (39) / down (40) / space (32) / enter (13) You can use multiple lines to create multi-directional movement.
View example; Download Move_object_with_keys


Recent Comments