Hey all! This is my first time using GML so I am not too great at it and I need a little help.
I am currently working on a 2D side scrolling shooter. I am trying to make enemies/entities spawn on the right side of the screen but I'm having some trouble. I have looked at a lot of videos and...
Hi!
My goal is to generate a final number in which it cannot be repeated, within a range of numbers from 1 to 5.
1 - This is what happening:
Notice that MEMORY_GAME and SWIPE_CARD were repeated in a very "close" way, when in fact it should give way to other friends that have not been added...
Hi
I have a 💩💩💩💩load of sprites to choose from at random, so i put them in a dslist.
var list = ds_list_create();
ds_list_add( list,
spr_human__1_ ,
spr_human__2_ ,
spr_human__3_ ,
etc.........
)
then i shuffle the list
ds_list_shuffle(list);
rdnm = choose (list)
and create...
I have a movement path for an enemy, but using the path makes the enemy predictable as to where it will go since it's a simple sine wave pattern. I'd like to randomize that start position along the path so each enemy at least starts at a different point of the path. Is this possible? Or do I...
How do I do it? I'm trying to pick a random value from an enum for an object at the creation of that object.
Do I have to set that enum's value in the create event (to zero) and then make it random in a step event? Or can I set that random value right away in the create event.
And, what...
This is just a point of interest I don't need help as such.
Has anyone, or is it normal to find a bug in your game but keep it anyway because it has an unusual effect that actually enhances the game?
Minecraft is an example (The farlands).
So I guess my question is has this ever happened to...
I'm new to game dev and it's my first time posting in this forum. I'm halfway through the trial period and about 40 hours deep into tutorials, free and purchased, and some playing around. Granted, this is a very short time. I'm just trying to figure out what GMS is capable of. I have a series of...
I had posted a thread earlier about my issues, but unfortunately to no avail.
Given there was a lot of information to write, I just put it in a video.
The gist is that as it appears, in some context, using random number generation just seems to cause some internal, permanent (until you close...
Hello everyone, I would like to simplify this code. What I want to do is change rooms randomly and the next room is not the same as the current room.
Here my code:
if (point_distance(o_player.x,o_player.y,o_portail.x,o_portail.y) < 8){
if (room == rm_player_1){...
I have a very simple spawning object which randomly spawns an object every 2 seconds. What I would like it to do the spawner creates the objects in the same y position of the spawner, but the x position I want to be randomized multiples of 24 (ie. x, x+24, x+48, x+72, x, x-24, x-48, x-72 etc)...
How do I call a random key from a ds_map structure? or will i have to create ds_list? a bunch of variables are created in ds_list, if for example I have 300 keys?
I tried to do something with this, but my head is not working as it should
var arts = global.artefacts;
var arts_size =...
I am generating random room with monsters and I need them to not spawn on each other. It works but looks terribly big, can it be simplified?
That's what I'm doing:
Script-Code:
randomize();
var x1 = 160 + random(room_width - 320);
var y1 = 160 + random(room_height -...
so I'm making a game that has keys in it and when thay follow you thay can get stuck and thay randomly move
the key will move randomly when the player is standing still.
the code:
//move to the player
if (instance_exists(obj_player)){
mp_potential_step(obj_player.x, obj_player.y, 10...
Hi,
When I use fonctions like random() or choose(), it's Always the same Numbers wich are given.
For exemple, with random(3), the program will give me 2,41 for sure the first time. Then 2,89 the second time. And 0,76 ; 1,94 etc...
So the random is not random ?! It's Strange…
In conclusion, my...
Hi, i've posted before about needing help with this for another problem, but here I am again. I've made some progress with a bunch of things but am currently stumped with trying to place down chests in the grid of the level.
It is based off of this tutorial, and this is the code that came with...
Let me explain my problem in this example.
i have variables for each object
objvar1 = 1 obj1disable = false
objvar2 = 1 obj2disable = true
objvar3 = 3 obj3disable = false
objvar4 = 1 obj4disable = false
one empty ds_map
and i have 4 objects...
Hi I Had an Idea to Have a Random number that is Set at the beginning of thegame and depending on what number was rolled you would get slight variations to the main game.
But I Was wondering, How does Seeds work, Is the seed That I Export the Game With The Seed everyone Gets? Or is the Seed...
Hi, I've recently coded a maze generator inside a ds_grid. Each cell has a string value like "0000" or "1010", etc. Each number represents a wall/exit (0/1) around that cell (left-right-up-down), having a total of 16 combinations. Then I run a script that seals most of the "one way exit" cells...
Hello, i make a game for mobile devices and faced a problem. After the player hits cube with the same color, player should change its color to random. I am trying to do it with random_range, but it does not work, looks like gamemaker does not understand that i want to assign new variable through...
Create;
global.roomno = irandom_range(1,4);
global.rm_go = asset_get_index("q_room"+string(global.roomno));
Mouse Clicking;
room_goto(global.rm_go);
..
I'm organizing random rooms for quiz and I'd appreciate it if you help.