object

  1. P

    Windows "physics_apply_force" doesn't work for 0 density object

    I have an object with 3 fixtures (don't know if that counts). It has physics enabled and 0 density because I need it to stay still on screen. I'm trying to use "physics_apply_force(x, y, 0, -15)" on "Left pressed" on it. Doesn't budge. Is this the way things should work or am I doing something...
  2. B

    Transferring the object

    Hello everybody I am quite new to game maker studio so I wanna ask you something. How do I transfer my object (player) from one room to another along with some other objects too. Any help please. Thank you
  3. N

    Legacy GM With but not self.

    Hi, this doesn't work: with (obj_projectile(not self)) instance_destroy(); Can someone please give advise?? Thank you!
  4. G

    [SOLVED]Making it so when a player touches an object it boost or decreases another objects speed.

    So as the title states I need help getting it so when a player collides with another object it decreases and increases another objects speed. So far I was able to get it to do both increase and decrease an objects speed, but it works weirdly. So I want it so after a few seconds the boost in the...
  5. S

    Checking for objects! Help!

    Hello! So I have a problem with my enemies spawning on items and each other, and not being able to move. Can someone show me the code to check if there is not an object in the way before spawning the enemy? I know it’s simple, but I’m self taught. Thanks for your time!
  6. G

    GMS 2 [SOLVED] Problem with moving an object a certain way.

    Hi, so I'm in the progress of trying to master the Gamer Maker 2 programming language. Recently I stumbled across a little problem. What I'm trying to accomplish, is moving an item object to the center of another object, whereafter a series of events will trigger when the two objects are on top...
  7. M

    GML Object Stuck After Idle Animation - Can't move unless I jump

    The movement in the game I'm working on appears to be bugged. It will not let me move right or left unless I've jumped first. If I start moving, I can keep moving, though sometimes changing the direction makes it stuck too. Jumping works good and as intended, its just sometimes the movement...
  8. N

    Legacy GM Seperate options for same object?

    Hey all! A quick question: is there away (or a way to work around of it) to have 2 of the same objects in a room but have different variables? For example: Messageblock 1: var message = "Welcome! The movements are simple. Just walk with the arrow keys!" Messageblock 2: var message = "There is...
  9. Y

    Legacy GM mouse following object

    So I looked around and I have seen alot of how do I make my object follow the mouse threads. but my question is: how can I make my mouse follow an object. I need this so I can use a custom cursor object that acts like a mouse but I can't find any functions that let you change the mouse position...
  10. G

    GML Getting stuck

    Need help :/ I get stuck. I don't know why. I mean, the width and height on the room are 640 x 480, snapped as 16x16 and the objets as player, enemies, blocks are 32x32. In the left side I get stuck but in the right side is correct. Someone help? But in right side I don't get stuck. But I...
  11. P

    GML object_get_sprite doenst work

    Hi I wrote this code voor a topography game: currentquestion = object_get_sprite(obj_topoquest); if((currentquestion == argument0 ||currentquestion == argument1) && global.vraagtopo <9){ ding = random_range(0, 23); switch(ding){ case 0: with(obj_topoquest) sprite_index = spr_drenthevr1...
  12. D

    Discussion object limits

    Hello, I have a problem when i creat lot of object he say " You have reached the limits of GameMakerStudio 2 Trials for "Object" its normal ? why ? and i can deblock this ( i think but who ? )
  13. M

    Need help with Object Movement Error

    In my game I want the Star Wars Jawa you play as to be able to crouch down when you use the Left Shift key. All the movement and everything works good, including the jumping and switching to crouch mode, except when he stands back up the only thing he can do is jump. I have it set to when L...
  14. S

    Question - Code Solved - Script passing value to variable?

    Using GM2 Simple question (I hope): Similar to how you make an array change in the script and also change it's value in the object calling the script, can the same thing be done for a variable? My question lies in this example code: <object> scr_test(my_array, my_variable); <scr_test> var...
  15. 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
  16. Nathan

    Mac OSX Room Editor : Replace/Swap objects?

    I am curious if there is a way to swap out objects that are placed in a room. For example, if I put 7 floor piece objects in a room and then wish to switch 4 of them with a spiked floor object, can I select an instance and swap it to a different object? For any video editors a perfect example...
  17. Rackover

    Legacy GM GMS spawns illegal objects on its own

    Hello, i'm in a bit of trouble. This is a big project file I don't wanna mess around with. When I start my game, it happens (one in ten times for example) that GameMaker Studio randomly spawns one or two objects from the ressource tree, with no reason ! No code is calling it, and sometimes it's...
  18. Ferrettomato

    Legacy GM [SOLVED] instance_exists still detects destroyed objects?

    I'm using instance_exists(obj_player) (where obj_player is the name of the player's object resource) to see if there's an instance of the player in the room so I know when to respawn them, but it seems to be returning true even when I've called instance_destroy and removed the player from the...
  19. TheOnlyWRT

    instance_position not returning instance id?

    Hey there, So, i need to be able to grab an instance of an object at a given position x, y and then access the variables in that instance to preform a few calculations. So, when i run the code below i get the error in the attached image (it esentially says that there is an unknown object). How...
  20. M

    Creating a new object

    I'm trying to create an object but when I type instance_create_layer(x, y, "Layer_Bullet", obj_bullet); it keeps telling me my layer does not exist and it very well does. I checked for spelling over and over again, I have tried renaming the layer itself and even using a different layer. I have...
Top