for

  1. A

    REALLY basic thing i cant figure out

    Hey, im trying to learn GML so i started creating a really basic game. My objective now is to create a moving enemy, make it move 2 seconds to the left, idle 1 sec and 2 seconds to the right, then repeat. This is the thing, ive write this code and what happens is that the object starts...
  2. K

    For each or Do Until?

    Hi there. In my game, I want there to be a mechanic in which the player can absorb x amount of objects and then fire them off (something a la Kirby but not quite), but once the fired object collides with a wall, I want to create the same number of moving instances as there were objects absorbed...
  3. W

    Creating app for steam?

    Is there any tutorial how to add my game on steam.... for idiots like me ;)
  4. D

    Find collision angle - is my code correct?

    I'm new to coding and have struggled with this problem for the past week or so. I'm trying to make a bouncing object via code without using GMS2 physics engine, so I'm having to perform several checks. One of them is to find the angle of the collision point. To do that I'm using a round object...
  5. L

    GML Populating a large 2D array using for loops and switch statements

    I have a large 2D array that I'm trying to create and populate with data automatically using a switch statement inside a for loop instead of having to manually type in every array entry. I feel that it is possible using the right code, but since I'm fairly new to GML I clearly don't have it...
  6. R

    GML [SOLVED] Problem with alarms

    Hello everyone In one of my objects, I have a piece of code where a for statement iterates through an array, and checks what is stored in all the array positions. According to what's in the given position of the array, an action will be performed. The thing is that I'd like to add a delay of 2...
  7. R

    GML Problem with objects/instances

    Hi there! I'm trying to continue making my game, but I'm facing some objects/instances problems. I'm working on the code (script) below: with (obj_button) { if (empty) { show_message("EMPTY"); } else { for (i = 0; i <= array_length_1d(vec_exe) - 1; i += 1){...
  8. S

    loop fails to repeat

    Hi been using game maker for about 2 days but I've been programming for a little while. We were having an issue in our game with the knife sprite animation not showing so I wrote a loop for it. The problem is the loop doesn't seem to loop and I cant figure out why I set a global named bn in a...
  9. I

    Legacy GM For loop help.

    Ok so i have a for loop it works fine im just having an issue applying it where i need it. This creates the boxes for each level.(No issue here) numberOfLevelsPerRow = 20; numberOfRows = 10; for(i=0;i<numberOfLevelsPerRow;i++){ for(u=0;u<numberOfRows;u++){...
Top