• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

choose

  1. N

    Crazy, or a bug in choose()?

    GMS1. So I'm at a loss on this one. The bug here is that choose is choosing numbers that do not exist in my list. Choose(x_range) and choose(y_range) are both picking wildly huge integers - like 9998 or 2248, for no discernible reason. It should currently only be able to choose 10 as the value...
  2. flyinian

    SOLVED Assistance with code help

    I am trying to add randomization to my combat system and experimenting with different code styles. When I use "var enemy" or "totalcounttarget" directly to adjust the value of "Count 1", it doesn't work. If I use the "Count 1" directly, it works but, I lose the randomization for my combat...
  3. C

    [SOLVED] Do sprites need to be in a particular order? (sprite_index)

    My game spawns randomly generated obstacles that choose from a list of sprites for a single "obj_walls" object ("spr_walls", "spr_walls1", "spr_walls2", etc...) and it it flips them along the x-axis (horizontally) when the player comes in contact with an "obj_flipper" object. It flips back to...
  4. T

    GML choose and irandom not working

    Hello I've been working on a project recently. I am at a point where I am trying to give my object random sprites with the "choose" command. This isn't the first time I have done this and on previous projects it was working. but recently I found out that my sprites weren't being randomly...
  5. Architheutis

    Strange random-behaviour

    Hi Folks, On running a code like this, ALWAYS results "6 Knifes". It only changes by adding or deleting one or more weapons. But after changing the ammount of the choice, the same weapon is shown again and again. CasualWeapon_ = choose("Crossbow", "6 Knifes", "Hellbarde", "Warhammer", "10...
  6. P

    GameMaker Choose blend based on existing objects blends

    Hi guys, I have a room with random objects, every object will have a color, marked with a number (0=red, 1=green and so on). The player must destroy the objects with a bullet of the same color, the bullet change color every time you shoot. Here we have the script Now, you will reach a point...
  7. P

    GameMaker Random color + with +/- chances

    Good morning guys! I'm trying to do a little game based on colors. What i have right now is an object that will choose the color you will play with. every turn you will deploy this color inside the field and then another color will be choosen. what i want to do : I want the code that choose...
  8. D

    Help with enemies's position

    How can I make the cursor jump to the next enemy checking if the next enemy its alive or not? I saw a stream where the guy used ds_list to do that I want, but doesnt explain how this works :/
  9. W

    Idea What should I name my game?

    I'm making a game which is currently called A.A.T and some people don't pronounce it and it doesn't roll off the tongue. It was originally going to be called Lane as the persons whose life it was based on, their last name was Lane. I ended up falling out with them kind of and then I changed it...
  10. H

    choose() seems to pick more than one variable

    Hi! I am having trouble with the 'choose()' function. I have made two variables, rupee and heart, both of which are set to create an instance of either a heart or a rupee when activated. I have set up a 'random()' function as well that sets a 1/3 chance for either one of these variables to be...
  11. Pfap

    variables holding programs

    [SOLVED] Hello, is it possible for variables to hold programs? I'm trying to use the choose function like this: choose( control1, control2, control3) in the create event I set up the variables: control1 = { if keyboard_check(vk_up){ y -= 3} (rest of keyboard inputs) } control2 = It's not...
  12. DividingByZero

    Legacy GM choose()

    I am curious if anyone has had this issue: I am using choose(s_map_1,s_map_2); to randomly choose between two sprites. And before this is run I am running randomize(); to get a new seed. The problem I am seeing is that despite the fact that I am doing a randomize (which I can confirm is...
  13. G

    Legacy GM [SOLVED] Help with Instance destroy and "Choose"

    So, I have 5 objects. ObjSignal Sun Moon Zombie 1 Zombie 2 Zombie 1 can only die when it is with Sun. Zombie 2 can only die when it's with the Moon. I have a ghost object that exchanges the Sun for the Moon every 10 seconds. The change of stage from the Moon to the Sun is running smoothly...
  14. N

    Legacy GM [Solved] Idle NPC Actions Help

    I want an enemy object to behave calmly when it doesn't notice the player. For this, I made a variable, "spotted," which activates whenever the player makes contact with an object "obj_spotlight." I have the spotted mechanics down so that the enemy chases the player until they hide. However...
  15. G

    Legacy GM [SOLVED] Help to "Choose" which to destroy

    I come here with another post for help. I am working on a project in which every 30 seconds, the scenery changes, getting day and night, and thus changing the sun by the moon. But the question is: How do I, when I change the scene, it is possible to kill only one type of zombie? I have two...
  16. O

    Legacy GM How do I change direction by angle

    I do an object that according to this line of code, I want to move in different directions every few seconds: motion_set(choose(45, 135, 100, 225, 315), 5) In addition I want it to change the angle of the object according to the conveying direction. How can i do it?
  17. D

    [SOLVED] How to use choose in a step event

    Hi. I been trying to figure out how to make an object spin around itself choosing randomly between clockwise and counterclockwise, so I have the next line of code in a step event: image_angle += choose(9,-9); Now, I can make it spin counterclockwise using: image_angle += 9; and clockwise using...
  18. M

    Opinion GameJolt or itch.io

    After what happen with Steam, my teammates are having second thoughts of whether considering using Steam in the future or not. I preferly don't want to take the risk, specially when we are starting with no budget at all... So I need a backup. In between GameJolt and Itch.io, which of these have...
  19. J

    Legacy GM Choose random instance_create inside Alarm?

    ( instance_create(64,16,asset_object_ammo), instance_create(144,32,asset_object_ammo), instance_create(208,32,asset_object_ammo), instance_create(288,16,asset_object_ammo), instance_create(160,80,asset_object_ammo), instance_create(192,80,asset_object_ammo)...
  20. E

    Choose isn't Random!?

    I'm making an RPG and I have a battle system that chooses a random enemy. The simple bit of code that does that is: ///Creates the enemy global.enemy = choose("stonemermaid","FAT"); if (global.enemy = "stonemermaid") { instance_create(224,128,obj_stonemermaid); } else if (global.enemy = "FAT")...
Top