spawn

  1. 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 +...
  2. 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...
  3. 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?
  4. 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...
  5. sinigrimi

    GMS 2 [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...
  6. sinigrimi

    GMS 2 [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 -...
  7. Yizzard

    GMS 2 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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.:(
  12. NeZvers

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

    GMS 2 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] =...
  14. 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...
  15. GDK

    GMS 2 [SOLVED] Spawn Random Enemies

    How to spawn different types of enemies from the same spawn object but not at the same time (one enemy type at a time)? Below is what I'm currently using to spawn oEnemy every 3 secs... if (!alarm){ instance_create_layer(x,y,"Instances",oEnemy); alarm[0] = room_speed * 3; }
  16. G

    Spawning enemies with certain values?

    How would I spawn an enemy from another object and then set a variable within that enemy? I want different enemies to have different values based on the objects they come from.
  17. P

    GMS 2 Making projectiles fall only in one room

    Do you guys know how to make projectiles fall only in one room? When I'm making emiter it constantly spawns projectiles in all rooms I enter despite that the emiter wasn't persistent.
  18. 6

    Variables at create

    Hello! I'm making a game and on a few levels I want survival mode. For this i made a spawner object that has 2 variables 1. Enemy type //Which enemy to spawn 2. Delay //Delay beetwen spawns When the player enter a level the level is being called from a script (the script spawns all the objects)...
  19. F

    Looping Clouds – spawning, destroying, adjusting variables

    Hey! I'd like to have cloud shadows that move across the screen, destroying themselves once they move off screen, and then re-spawning. I have obj_cloud where I define the properties: image_speed = 0; image_index = irandom(3); image_alpha = 0.1 * random(0.3); image_xscale = 1 + random(0.2)...
  20. V

    RPG first person enemy spawn fight

    Hey there!! Sort of having trouble on making a first person dungeon crawler game. Basically I want to make my enemy spawn in front of the player as in these games but having trouble calling out the enemies to appear or even switch to a scene of a new area with a better background but random...
Top