object

  1. H

    How to attach and object to another object?

    So an object is moving from for example 1920 to 0, and an another object stay's in collision. I want the other object always being attached to the first object, how can i do it? Thank you guys!
  2. M

    Windows Hi, I'm new. How to place player on top of an object?

    I have two layers. One for the player and one for the floor. When I try to place the player object on top of a grass object it is not aligned with the grass object.
  3. shostifrosty

    Legacy GM Object movement with paths

    Hello everyone! I've been struggling for several days with the objects movement through paths, and it would be awesome if someone could help me out a little with an issue I have. What I want to do is to have pedestrians moving around in paths I specifically designed for them. So far, I could...
  4. EZTALES

    Legacy GM ISSUE WITH DESTROYING OBJECT IN NEXT ROOM.

    hey yall. just having a small issue with destroying an object in the next room, im using a level system so when you reach a certain level, some things are deleted. heres the code. and yes the room uses physics. /// room end with (obj_player_stats) { if level = 2 { audio_stop_sound(sad_snowfall)...
  5. S

    GMS 2 Detecting all objects within a specific range

    I have a combat system that changes the behavior of enemy AI based on what other enemy AI are surrounding them. I need some sort of way to detect all of the objects near each enemy. I considered storing every enemy object's x and y coordinates in a list, and then creating a script to determine...
  6. inertias

    Help me understand this code that works

    So someone asked a question on reddit about instances following the individual object that creates them. If you look at the posted solution, it works perfectly but I don't understand why. Here's what they wrote: Haven't been programming for long so I don't understand the "inst.creator"...
  7. Krenzathal77

    Legacy GM "with" command destroying wrong object

    Bit of an odd problem here. I have it so that when my player land on top of an enemy the enemy gets destroyed - sort of similar to how the Mario games work. The issue is that the "with" command is completely destroying the wrong instances, in fact it's destroying every instance of a type of...
  8. I

    Need help keeping cursor inside object.

    Hello! How can I keep cursor inside an object? For example, I have a volume slider and I want to keep cursor inside it until mb_left is released. I'm also going to hide the cursor and change a sprite of the slider. But first i want to figure out how to keep the cursor inside the slider when...
  9. D

    Question - Code Is it possible to remove an Event during run time?

    Hello! I would like to remove the Step Event for some objects during run time (i.e, while playing the game) via code, is it possible? For example, let's say I have an object with Step Event defined in IDE. Then I run the game, start playing, an instance of that object is created, and later I...
  10. Z

    Layer Depth Assignment From An Object To Another [SOLVED]

    Hi everyone ! I have two objects : - The first one is the one the player controls. Named "PLAYER". - The second one is an object (rather a group of objects) distributed on several layers. Each layer has its own depth and each object from that group take the depth of the layer on which it has...
  11. M

    Legacy GM Created exists instance is replaced by other created instance

    Hello I need help with my code because I tried everything what can I do with my skills and I don't know how to fix it... here is problem: https://imgur.com/a/P4iHi6c Just when particles (object/instance) exist and also created new one, exist particles is replaced by new one. I tried any...
  12. S

    Lighting on objects

    How to do a realistic lighting on objects? If a light directional light falls on an object, then the side of the object facing the light should be brighter than the other side.
  13. PlayerOne

    GMS 2 [SOLVED] Drawing an object on screen

    So far this code will position an object on screen (not in the gui) and can be interacted with. This all works as intended. However every-time the player moves the object in question will shift slightly while still staying in place. I checked other forum posts for a solution but the results...
  14. N

    (SOLVED) Error when passing an object as a script argument

    Greetings, first time posting here. I'm trying to make a standard turn-based battle system, but I keep having trouble when starting the battle from a script. I'm trying to pass enemy objects as arguments, so the script assigns them to the enemy array in the battle_logic object. Here's my code...
  15. L

    Legacy GM Sentry Enemy Coding Help

    I'm working on a stealth game and revising some mechanics. I have a sentry enemy that used to have a constant, swiveling line of sight. I'm trying to change it at the moment so it instead lies "asleep" for a few seconds, "blinks awake" for a few seconds during which it can detect the player...
  16. zendraw

    Legacy GM Q:Unknown object.unknown variable

    why does this code if (place_meeting(x, y, par_alien)) { with (par_alien) { if (place_meeting(x, y, other)) { var abz=abs(z-other.z); if (abz<other.targ_range) { other.targ_range=abz; other.target=id...
  17. P

    Drag And Drop Child Ojects Changing Because of Parent

    Hey, I'm a beginner to GameMaker and I'm having some difficulty with two of my objects changing their sprite because of their parent object. I have the child objects (the boots) change their sprites depending on the direction the character moves. I have also set the parent object's (ship body)...
  18. S

    GMS 2 Few issue. I record video on youtube :-)

    Ok here is a video and please dont punish me for accent and all aboat my english i know its terrible. Here is first code for sticking object : Here is code from weapon: Here is code for moving and shifting: Thank you for reading and answers.
  19. S

    Movement control

    HI everyone. I am not so cool at gamemaker, so need your help. In my game i have objects that move with other ones, for example spaceship that is flying and turret that is on it and can rotate and shoot. Same thing with many other objects, but when one object move another object move not...
  20. 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...
Top