Hi guys Im making a gta like game and I want civilians to spawn just like gta, the idea is that if the civilian is as a specific distance from the player it will spawn and walk on a path but it has to spawn on this path at the closest place near the player but not to close otherwise the player...
I have something that gathers instances in a room into a 2d array for spawning them in the room or a later room. It can limit which instances are gathered by their depth. Will this gather layers correctly if I check the depth variable as long as the layer has the specified depth number? Is there...
I want to make a gun that when I press the mouse button, it shoots bullets. Im using this code for spawning the bullet instance:
if (mouse_check_button(mb_left)) and (firingdelay < 0) {
firingdelay = 10;
with (instance_create_layer( x+ lengthdir_x(26, image_angle),y+ lengthdir_y(26...
Hello there,
I'm working on a brand new indie game inspired by the classic Atari games, Pong and Breakout, but it's a game that goes on and on endlessly, or at least until you lose the ball. The link to a more recent gameplay video is at the bottom. Anyway, I'm hoping to add a visual scripting...
Hey! I am trying to make an enemy pool based on player level, sort of an RPG element which the higher the level you're, the stronger enemy types you will encounter.
Anyone experienced with this can point me out into a smart or math based way to handle it without having to go with switch cases...
Hello everyone, I would appreciate your help.
This I am trying to do.
1- Object name Bullet.
2- One Bullet will be shot randomly from any of the 4 sides of the room.
3- after that bullet go out the room, another one will be shot.
Hey! I want to place an enemy in each floor of the room, here's my script (i'm kinda new so it's a simple script):
///@arg collision
///@arg obj
function random_platform()
{
var collision = argument0;
if instance_exists(collision)
{
instance_create_layer(collision.x +...
Hi there, long time user and lurker of GM. I'm currently having a problem with instance creation, none of the instance functions seem to draw to screen despite being in the draw method.
Here is my simple test code, which does not draw:
create_instance_depth(room_width, room_height, 10000...
Game maker 1.4:
I put an enemy in the room, but even when I kill him, when I enter again in that same room, he spawn again with the full life. How can I avoid the enemies that had already dead of spawn again?
Hello!
I have a top-down shooter where the player shoots towards the mouse with both the player and bullet sprite rotating towards the mouse. However, I am trying to get the bullet to spawn at the tip of the gun on the player's sprite, but I am having a real hard time doing that. The code I...
Hello! When I enter the room, it reproduces the blocks, but when I move to the next and return to the first, nothing is reproduced in it :(
p.s .: rooms are not from GM but are generated in the same GM Room after moving outside the camera.
I would also like to know if I can mark these objects...
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 have this system where all items (weapons, consumables, etc.) are children of an overarching obj_Item. It's children are obj_Weapons, obj_Consumables, etc. which in turn are the parents to obj_SteelSword, obj_BucketOGoo, etc. which are actual items. I wanted to have an item bank that...
Vendo um tutorial no youtube de como criar o jogo de nave, as naves inimigas estao spawnando muito juntas e queria que elas fossem mais separadas, mas não consigo achar no codigo de spawn das naves algo que faça elas spawnar mais separada, vou colocar o codigo pra alguem me ajudar.
if (random...
If you continually create and destroy many instances quickly (meaning there's never too many at once), what happens if this is done for a very long time in one room? Do higher and higher id numbers cause any performance hit, or crash over hours? Does the id number eventually wrap around? Are...
Hello!
What I want to do is to spawn objects randomly between 5 different spawn points , so what I am trying to do is to add an array to a spawnManager(object) that will take those spawn objects into the array and then randomly spawn an object from one of those spawn points with a timer... but...
Hi nooby question i am trying to create asteroid spawner with alarm.I can make them spawn after a second but how to make them like spawn 5 and delete alarm or in duration like after 5 seconds delete alarm.:(
I have a game master object that is creating controller objects and player objects in Room Start event but for some reason, It doesn't change needed variables (they stay as they are defined by default). All I need it to toggle what inputs controllers should respond.
I don't get it, I thought...
I've been trying to make a spawner in a game and the code wont spawn anything.
in the step event
if(obj_stats.level < 5 and spawn == true) {
alarm[0] = 30
spawn = false
alarm[2] = 32
}
else if(obj_stats.level < 10 and spawn == true){
alarm[0] = room_speed * 7.5
alarm[1] =...
Hi everyone
currently, I'm working on my first project with code. and now I'm at the point to add enemies. I would like to make a spawner where the enemies are created within a current amount of time.
basically, there needs to be an object where my enemy's spawn after about ten seconds. I think...