object

  1. E

    Legacy GM Dynamic object generation

    MAIN: I want "fields" to be crated along the "road" object. The "fields" should have no preset size and should be dynamic with a max size, and be automatically created along the side of the road. Those "fields" should be objects, or at least have an object that relates to them (one per...
  2. S

    Check if id of instances is a certain object

    I want to check if my oPlayer instance can see another instance (oInputable), without beeing blocked by all other instances, grouped under the object oNotInputable. Both of these objects are children of the oSolid object that makes them all solid for the Player. To check this collision I use the...
  3. M

    Problem when grabbing several items

    Hey everybody. My skills with game maker have been improving considerably, but I still have some doubts and I'll be very grateful if you help me. I've want to create items with which the player can "call" special strikes against the enemy. For example, the first item I made is for calling a...
  4. C

    GMS 2 Add Instance to Layer

    Hello, I'm trying to have the player object remain on a layer that has the same name throughout all rooms in the game. When I start the game, I do receive an id number when debugging and the same is true when I change rooms. However, when I go back to the original room, the game freezes when I...
  5. Furkan Karabudak

    GML There is a delay in following the objects

    I am trying like this : //Step event object.x = view_xview[0]+10 object.y = view_yview[0]+700 But there is delay. How can I ensure object follows the view without delay?
  6. FrostyCat

    What's the Difference: Objects and Instances

    What's the difference: Objects and Instances GM Version: N/A Target Platform: All Download: N/A Links: N/A Introduction At least a dozen times a week, I see questions on the Q&A section that have to do with people not distinguishing objects from instances. This topic aims to explain the...
  7. B

    Legacy GM [SOLVED] Weapon's barrel face the moving enemy

    Hey guys,in game maker i've created a weapon and an enemy objecct and i want the weapon to face the moving enemy,so basically i want the weapon's barrel to face the enemy. I have tried it with this code: if(instance_nearest(x, y, obj_enemy)) { image_angle = point_direction(x, y...
  8. Y

    GML Trouble with sprite/object

    Hi, I'm having a problem. I have a have an transparent object that when I try to create it with instance_create. It isn't transparent. This has been bugging me for a while.
  9. Y

    make Object's rotation based on object position

    so I'm currently making an android game. atm i'm using my mouse to make the object look at it (as it always moves forwards) but this is isn't a really good solution. what I'd like to make is an object in the botom left corner of the screen that resembles the rotation based on its position...
  10. R

    GML Creating variables for copied instances

    Hi everyone! Let's say I have an object in my room. Then, through some way, I copy this object, creating a new instance of it. I can keep copying it if I want, ending up with multiple instances of that object. What I would like to know is, if it's possible to address a new variable to the...
  11. G

    GML Stay in same screen position

    The effect is very simple: I need to make the object constantly snap to the screen. The problem is that I really need that object (not only witht the draw event), and I can make it work with something like: "x=view_xview[0]+0; y=view_yview[0]+0;" The problem is that the object "moves" while the...
  12. Shadowblitz16

    GMS 2 changing room does not happen until after event?

    does anybody know how to get around my object being deleted after I change rooms? //Goto Room room = rm_menu; //Toolbar tools_menu = new_item(0, 2, 0, Item_Toolbar_Menu, new_exit(6,6,5,1)); //Menus menu_tiles = new_item(0, 16, 6, Item_Option_Tileset, new_exit(0,0,6,6)); /// @description...
  13. H

    Multiple Use for one Object?

    I have spr_title: it has 3 subimages (not for animation) obj_title: every instance for a subimage has been created in room i want to know if there i way to code every single instance of the object in the event. Thankyou
  14. MicroKiss

    Legacy GM To many objects make lag. /SOLVED/

    So I have an idea in this game where you can't see anything but you can shoot pixels to discover your map ABut the problem is that if I play for a while there will be to many pixels which are slowing down the game. Here is the game : https://ufile.io/73guu Could you please suggest solutions for...
  15. Shadowblitz16

    GMS 2 drag a window boundaries by updating mouse object's position to mouse previous x and y?

    does any body know how to keep an object snapped to the mouse position only on last frame? I thought instead of offsets I could do something like this.. //Mouse object step event var _widget = instance_position(x, y, UI_Widget); if (_widget != noone) { var _x1 = (_widget.location.X)...
  16. R

    GML Trying out an idea in GameMaker

    Hello everyone! I had an idea these days and I'd like to know if it's possible to implement it in GameMaker. Let's say I have an object, like a square, and other objects, similar to blocks. Each of those blocks would contain actions, like walk, jump, attack, etc. My ideia is to put those...
  17. S

    Legacy GM I want to code a swinging animation for a guy with a sword.

    I am new and cannot find the documentation that says how to switch sprites while creating an extended mask representing the weapon being used. The Step event of obj_player01: //Get the player's input key_right = keyboard_check(vk_right); key_left = -keyboard_check(vk_left); key_jump =...
  18. B

    How can I make a physics object jump to a specific location(instantly)?

    I want a physics object to jump to a location(xx,yy). I can't directly change the x and y of the object since it is a physics object. Also, there are other physics objects in it's path and I don't want to collide with them while this object 'teleports'. The only way I know how to do this is to...
  19. S

    player object not appearing in room when left button clicked

    I'm trying to add my player to the room but every time I click nothing is showing, I have the boxes visible, solid and physics selected for the object of the player and my wall object appears when I click to add it to the room but nothing happens for when I try with the player object, can...
  20. T

    Changing Sprite as it moves

    Hello, I am very new to gml and game making in general, I was wondering how I could make my sprite (main character) who has an idle animation. change to its movement animation as I press the button to move the object but returns to its idle animation as I unpress said button. I thank you for...
Top