loops

  1. flyinian

    SOLVED Looking to receive loop assignments for practice.

    I would like to receive assignments from you that involve loops. Mainly for loops. It would also be nice if you could look over the assignments and give me feedback. Types of assignments I'm looking for: 1. Broken loops that I have to debug and fix. 2. Create a loop with an outcome in mind. 3...
  2. Japster

    Latest Humble Assets bundle available - this time it's loops and soundtracks...

    I've just bought it at the £20 tier - it's definitely NOT one of their strongest bundles, and mostly by the same artist, but still seems great value even if you just find a few tracks for your game in there!... Nearly 9GB, and 700+ audio files - loops and tracks (including variations, mind) for...
  3. Richard Horne

    Isoloating and accessing one of the many objects created using a loop and an array

    I need to create many, many instances of an object but be able to refer to any of them individually in order to change the instance's properties. Using a simple for loop and an array I can generate all of the objects, but I'm coming unstuck when trying to target specific individual instances...
  4. P

    Trying to make an audio file play once

    Hi everyone, this one's fairly simple,for someone experienced anyway. I have a simple audio file that plays when my street lights come on, but it wants to loop even with the loop turned to false. It just plays over and over, I've tried setting variables to shut it off, but not sure what...
  5. Red Phantom

    GML [Solved] How to repeat code 100 times?

    I want to repeat this code: instance_create(0,0,obj_Bat) 100 times, using some kind of for loop. What is the overall code for doing this (without actually pasting it 100x)
  6. C

    Loops crash game

    I'm not sure what to do here, also i'm using DnD. Picture of code:
  7. M

    Legacy GM two variables=objects then checking position of each?

    I'm trying to compare the position of two objects after setting variables to = a specific object. It's in a loop so the variables are set to equal other variables that that have already been set to equal other variables. if currenttilelooper=0 { currenttilelooper=currenttile...
  8. Nixxi

    UWP [Resolved] Having trouble creating/initializing global variables

    Hello GameMaker Community. I'm having an issue with creating global variables for sharing information between the players, game objects, and ini reading/writing. Part of the problem is that my game has a max of twenty (20) save slots, each slot has roughly 5,200 individual datapoints (for...
  9. XirmiX

    GML Replacing loop names with jojo memes?

    Okay, this might seem really stupid, but I thought I'd ask anyway... I thought it would be fun to just change the names of some loops just to make programming a game a little more fun for myself. You can create custom functions through scripts essentially and give them your own names, but is...
  10. FrostyCat

    GML What's the Difference: Loop Structures vs. Step Checks and Alarms

    What's the Difference: Loop Structures vs. Step Checks and Alarms GM Version: GMS 2.x, GMS 1.x Target Platform: All Download: N/A Links: N/A Summary: An explanation of when to use loops and when not to, plus a brief overview of non-blocking repetition Summary Many recent novices needlessly...
  11. jana

    Portfolio - Audio Music loops, ambient, beat

    Hi, my name's Jana, I'm on a constant quest to offer high quality sounds and music to my fellow gamers. I've posted quite a few tracks on my website, which will give you an idea of some of the sounds I can create for your project. Here are a couple of samples: Sample 1 Sample 2 If you need...
  12. Erayd

    Android Attempt at destroying all of one instance failure

    I'm looping through all of the available enemy objects currently existing in the room and destroying them one by one. In theory anyway, since that's not what's happening. Actually for some odd reason only some of the enemy objects are disappearing. Any thoughts as to why...
  13. T

    A question about scripts

    Hi. I am using scripts with FOR loops in them, and I was wondering which is best for exiting the loop. If the condition is met that I'm looking for - is using RETURN, and going to the next script, within the loop okay to exit it? Or is it better to exit the loop using BREAK, and then move...
  14. B

    Windows GM:S loops n stuff

    hello there, so i need a help with piece of code there it is: ##### randomize(); var n; var i; for (n=0; n<=9; n=n+1) { deck[n]=irandom_range(1,10); for (i=n-1; i>=0; i=i-1) { if (deck[n]==deck) { deck[n]=irandom_range(1,10); i=i+1; } } }...
  15. R

    Legacy GM Is there a GML equivalent of 'jump'/'goto'/'loop'?

    Hi again Everyone! I was wondering if anyone knew of an expression in GML that acts in the same way as expressions such as 'jump' or 'loop' do in other frameworks/languages? Basically I'm wondering if there is a way to control the flow of code within a script / execute code action. The code...
  16. Wild_West

    A loop question[solved]

    I'm working on a new project that centers around using a series of numbers held in an array to allow the player to manipulate different objects. I have my setup all done, but there;s one thing I can't figure out. I want to be able to stop any object interacting if the array that holds the...
  17. D

    Legacy GM [SOLVED] 'Else' in a For loop

    Hi all, I've got a create event with a bunch of words in an array set up like so, word[0] = "this"; word[1] = "is"; word[2] = "an"; word[3] = "example"; ... and the idea is that when I type a word in to a box, it checks through the array to see if it exists. Currently I have the loop as...
  18. 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++){...
  19. E

    Windows Objects moving towards themselves!

    in my code i have a variable called action, this variable changes depending on what state/equipment the spaceship has, the main problem is that because the game has ships with repair tools, these ships will try to repair themselves forever. because the nearest friendly ship they can see is...
Top