Using array of images to spawn enemies in game

Hello @dsdsdsds,

A good place to start:

Break down what is required first:

  1. Array of images < Assuming you have already done this.
  2. Access a random element of the array.
    This reference may help:
    random() / Reference / Processing.org
    You will have to convert the float to an int to access elements of array:
    int() / Reference / Processing.org
  3. Search for timer (or related keywords) in this forum for examples of timers.
  4. Write some code to understand each element above.
  5. Start piecing the elements of code together and later integrate it into your project.

:)

3 Likes