create

  1. 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...
  2. 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 =...
  3. 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);
  4. 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
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. EZTALES

    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...
  12. 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 ==...
  13. 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 ?
  14. 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...
  15. 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...
  16. 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...
  17. Carloskhard

    GML using alarms cuz code in create event don't run inmidietly.

    So my problem is that a lot of code in the create event dont seem to activate inmidiatly. For example: I have an object that creates a ds_list. Then another one that create an instance of that list in his "create event", however I got a problem saying the list was not found so I have to tell...
  18. L

    Windows Create an object on click

    Hello, i'm kinda new to game maker and i wonder how you could create an object when you click and where your mouse is. thanks for your help
  19. C

    SOLVED: Instance_Create with Alarm event

    Good Morning, I have an alarm[0] that in 3 seconds I want the alarm to trigger and create an instance of an object after I press my action button. Any help would be appreciated. I created a alarm[0] event with the following: instance_create(x,y,obj_Garage_Door_Up) In my step event of the...
  20. Anomaly

    Suggestion: object from sprite funtcion

    I've looked around and am missing where to put technical suggestions so i posted here. Mods please move this to where it should be if it's not here thanks. I was wondering if there exists, or if not .. if this could be implemented? Simply put, a drop down function or keyboard shortcut to take...
Top