Untitled
unknown
plain_text
6 months ago
2.5 kB
4
Indexable
playSound("sound://category_movement/cartoon_blast_off.mp3"); setBackground('#000000'); makeNewSpriteAnon("ship06_1", ({"x":84,"y":200})); addBehaviorSimple(({costume: "ship06_1"}), new Behavior(wobbling, [])); function patrolling(tento_objekt) { moveForward(tento_objekt, 5); if (isTouchingEdges(tento_objekt)) { edgesDisplace(tento_objekt); changePropBy(tento_objekt, "direction", 180); } } function math_random_int(a, b) { if (a > b) { // Swap a and b to ensure a is smaller. var c = a; a = b; b = c; } return Math.floor(Math.random() * (b - a + 1) + a); } function wobbling(tento_objekt) { setProp(tento_objekt, "rotation", math_random_int(-1, 1)); } function moving_forward(tento_objekt) { moveForward(tento_objekt, 5); } function growing(tento_objekt) { changePropBy(tento_objekt, "scale", 1); } function moving_west(tento_objekt) { moveInDirection(tento_objekt, 5, "West"); } function spinning_right(tento_objekt) { turn(tento_objekt, 6, "right"); } function moving_east(tento_objekt) { moveInDirection(tento_objekt, 5, "East"); } function moving_north(tento_objekt) { moveInDirection(tento_objekt, 5, "North"); } function moving_south(tento_objekt) { moveInDirection(tento_objekt, 5, "South"); } function jittering(tento_objekt) { changePropBy(tento_objekt, "scale", math_random_int(-1, 1)); } function wandering(tento_objekt) { if (math_random_int(0, 5) == 0) { changePropBy(tento_objekt, "direction", math_random_int(-25, 25)); } moveForward(tento_objekt, 1); if (isTouchingEdges(tento_objekt)) { edgesDisplace(tento_objekt); changePropBy(tento_objekt, "direction", math_random_int(135, 225)); } } function shrinking(tento_objekt) { changePropBy(tento_objekt, "scale", -1); } function spinning_left(tento_objekt) { turn(tento_objekt, 6, "left"); } function fluttering(tento_objekt) { changePropBy(tento_objekt, "y", math_random_int(-1, 1)); } function moving_west_and_looping(tento_objekt) { mirrorSprite(tento_objekt, "left"); moveInDirection(tento_objekt, 5, "West"); if (getProp(tento_objekt, "x") < -50) { setProp(tento_objekt, "x", 450); } } function moving_east_and_looping(tento_objekt) { mirrorSprite(tento_objekt, "right"); moveInDirection(tento_objekt, 5, "East"); if (getProp(tento_objekt, "x") > 450) { setProp(tento_objekt, "x", -50); } } OK
Editor is loading...
Leave a Comment