1. AlfMandoor

    Creating objects problem.

    Hi everyone, I have an object that I would like it to spawn into the room anytime I click any area of the room, I got it working, so if I click the object it destroys, but I would like that instead of always only creating one object, If I click, it can create randomly eather one or two Objects...
  2. giraffeman210

    GMS 2 Instance Create based on Viewpoints

    This seems simple and yet I can't find anything about it. Is there a way to create an instance based on coordinates of a viewpoint? Say I have a room a few screens wide yet no matter where I am I want to create an object in the middle of my viewpoint? Is this possible or can I only draw things...
  3. G

    Drag And Drop Creating an instance using a variable.

    When creating an instance, is it possible to use a variable containing the object name instead of the object name itself? Whenever I try doing this, it results in an error.
  4. S

    GMS 2 Defining object depth by creation order

    hi I'm working on a pen&paper helper thingy that creates objects upon pressing a button (like map object;walls etc.). It's crucial that the last created object is overlapping all previously created objects and I dont know how to get that working. Sorting the depth by y-value makes no sense, I...
  5. M

    GMS 2 Making an enemy shoot at a specific direction

    So i have like a sniper that i want to shoot at a certain place (so the player has to jump over the shots) And i saw a thread about this which said i needed to add this code to the "create" section of the guy whos shooting the bullet: firingdelay = room_speed/6; alarm(0) = room_speed * 5...
  6. jobjorgos

    GML [SOLVED] how to send variables to the unique instance that the object creates?

    I want for each obj_train_cart object to create an obj_inv_block at it own x and y, and that keeps on the x and y also every step after it has been created. But now I get errors that say: variable obj not set when reading it in the step event. What can I do? OBJ_TRAIN_CART Create Event: obj =...
  7. William Garrison

    GMS 2 instance create (and resize)

    So I have a thing that creates a flame when you click... problem is I use a sprite thats too big. I dont want to manually resize the sprite. I want to be able to set the size in the command when it creates. How can I do that? Left Pressed instance_create_layer(mouse_x, mouse_y, "Flame", oFireSml);
  8. E

    Is it possible to create and open a .bat file with gms?

    Is it possible to create and open a .bat file with gms, can you tell me the codes if possible
  9. T

    Why var created in create event not being found in draw??

    I really searched and found no solution for this simple problem, i must be missing something simple... In the create event of my object im doing this: var hp = 10; Then in the draw event im trying to draw a bar with that var like draw_rectangle( -50, -40, 100/global.slime_max_hp*hp-50, -30...
  10. Architheutis

    Givin´ the instance another hsv (SOLVED!)

    Hi Folks, a little queston: I have certain levels in night ambience. Therefor I changed my player-instance`s hsv in that level, manually. But naturally, if my player gets assgrabbed by enemies or harmful objects, the k.o.-animation and the reanimated player idle don´t keep the manually...
  11. PlayerOne

    GMS 2 Bullets angle when player is moving

    Title says it all. I'm trying to get the player to shoot properly but the bullets keep moving at angle everytime the player character moves. Trying to make a metal slug style system where you shoot 4 ways. Any help is appreciated. I'm sure it's something simple I'm overlooking. var _xx=0 var...
  12. XirmiX

    GML [SOLVED] Assign code to just-created instance BEFORE it runs its create event?

    I've found trouble doing this. It essentially boils down to having the create event code from the object be placed inside the object/script that creates it. The "with" variable does not help at all, wish it did, seems redundant otherwise. What happens is: Object creates an instance of another...
  13. XirmiX

    Legacy GM Can GM not create its own ini files?

    It seems like all it does is copy an ini file to then include it in the game editor (engine), and when including files, it can get a bit broken if you're including, say, an empty template file, as it points to the file you selected, and then creates a copy after saving and exiting, and in the...
  14. Krenzathal77

    Windows Find ID of creating instance by created instance

    What's the best way for an instance/object to reference the instance that created it and then store that as a variable, but without doing it via checking for a collision or which one is nearest? I have an enemy instance which creates an instance of a hit object and I want it to follow the enemy...

    Legacy GM Sizing issue! please help ASAP!

    hey y'all. just wondering if you guys could help me with a problem i am experiencing in my game. when i play my game and go into the windowed version (not full screen) my level on the side of the room is too darn big! heres the code... CREATE: /// stats level = 1; expr = 0; maxexpr = 2...
  16. TheOakNuggins

    GMS 2 Instances Don't Run Code

    I've had two problems with creating instances. 1.) Animations don't play. 2.) The step event never executes. I'm trying to recreate Missile Command for school, it's due in 12 hours, and I can't figure out how to get the missiles to destroy when they collide. How I draw laser if dropTarget ==...
  17. G

    Question - IDE Adding GMS1 buttons in the IDE ?

    To create new sprite/objects/etc in GMS2 I have to right click in the workspace, then hover Ressources, and click Create new xxx. Is there a way to display "New Sprite/Object/Room" buttons as they were in the GMS1's toolbar ?
  18. N

    Help! Events not creating text box??

    Hello, I am brand new to GMS2 (Downloaded it this morning) and i've been watching tutorials on how to make platformers, but i've run into an issue. In every tutorial, when they click add event, and click an option (create for the purposes of this conversation) the Create window is a text box...
  19. S

    GMS 2 [SOLVED] Create Event Function Updates

    When I put something like this into the Create event of an object: { var j; var toughnesshp = 5.00; var toughnessiteration = 0.00; for (j = 0; j < playerToughness; j ++) { toughnessiteration = toughnessiteration + toughnesshp; if playerToughness >= 20 { if...
  20. Carloskhard

    How to introduce variables in an object before creating it

    So I'm making some planets which obtein their scale and other variables from another object which spawn them and send them the variables planeta = instance_create (xx,yy,obj_planeta); if (yy = 7000){ planeta.alpha = 1; planeta.image_xscale = 2...