spawn

  1. H

    make civilians spawn just like GTA on game maker

    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...
  2. 2

    GameMaker Gather and Spawn Instances, Using Depth vs Layers

    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...
  3. Marquitos3000

    Bullet spawn problem

    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...
  4. StardustBlaze

    Spawning Blocks in My Working Ball-and-Paddle Game

    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...
  5. JeanSwamp

    Spawn object based on level

    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...
  6. AlfMandoor

    SOLVED Random Spawn help.

    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.
  7. philipIII

    SOLVED Help with the creation of an obj

    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 +...
  8. J

    Instance creation not working

    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...
  9. F

    How to avoid the respawn of the enemies when I re-enter the room

    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?
  10. TheOnlyWRT

    Creating a bullet relative to a rotated sprite

    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...
  11. sinigrimi

    GameMaker [solved]removal from instance_create script if the object was destroyed

    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...
  12. sinigrimi

    GameMaker [SOLVED]Summon monsters in random but different places in rooms

    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 -...
  13. Yizzard

    GameMaker Question about spawning instances of children

    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...
  14. T

    Ajuda para mudar a programação.

    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...
  15. 2

    Spawn Despawn Objects: Any Problems with Getting Instance id Numbers Too High Over Time?

    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...
  16. T

    GML How to spawn objects from an array

    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...
  17. T

    Alarm duration/countdown

    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.:(
  18. N

    GML [SOLVED] var instance_create() doesn't change instance variables

    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...
  19. D

    GameMaker If statement not working

    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] =...
  20. B

    Enemy Spawner

    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...
Top