Queremos que haya un chance del 25% de que aparezca una roca, así que vamos a asignarle los números 26-50.

  • Ve a y arrastra if and adentro del evento de intervalo, pero afuera de otro if statement.
  • Prueba si rand_chance es menor o igual a <= 50 y si rand_chance es mayor que > 25.
  • Arrastra un Sprite at Position adentro del nuevo if statement.
  • Nombra esta figura new_object. Cambia su imagen a "rock" y colócala en (rand_x, 260).

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)