parent objects

  1. David Lorenz

    Parent Objects question

    Hello everyone! After quite a lot of time using parents to organize objects, I found myself tangled in what seems the need of having objects with multiple parents each. I tried to search for some solutions, but all I understood is that if I think I need objects with more than one parent I simply...
  2. giraffeman210

    GMS 2.3+ saving with a parent object

    I followed a tutorial to save objects and it said that if I gave each object the same parent object it would still load the individual objects correctly. However when I save and load, it loads every object as the parent object. Is there something I did wrong? Here is the save code and the load...
  3. W

    SOLVED Children not inheriting

    I have an object named pPlayerEntity which contains all the keyboard input movements and some information about a player state machine I have set up. My goal here is to have the player control multiple different little characters throughout the game. I thought I would do this by having the...
  4. b-wb

    Accessing "Variable Definitions" of an object type which currently has no instances

    Hey all, First time posting on here, I frequently find what I need by searching other people's questions, but haven't found anyone else trying to do this just yet. I'm working on a top down space flight game with controls similar to Atari's Asteroids but modular space ships made up of multiple...
  5. Writerstix77

    GMS 2 Parent Object, change cursor to object's sprite.

    I want to make the cursor change into the image of the object that is clicked on in the inventory. In each inventory object's LMB Release event I have the command to change the cursor to each specific sprite. For example, if the Inv_Wrench_Obj is clicked, I have the code...
  6. David Lorenz

    GML [SOLVED] Get ID of child objects

    Hello, everyone! This would probably be obvious for some of you, but I'm having troubles. I have a dialogue system that uses the collision of the player object with a parent object that have all characters as child objects in order to take different text from each. var inst =...
  7. Papa Doge

    GMS 2 [SOLVED] Better to keep upgrade logic in a single object or use instance_change() ?

    I'm planning out the logic for an RTS that has buildable/upgradable structures. For example, the player might build a sentry that has turret guns at first but then can pay an upgrade cost to add or maybe replace with a flamethrower. In planning this out I'm considering two paths... A) The...
  8. J

    [SOLVED] Issue with getting IDs of children using Parenting

    So in my last forum post I mentioned that I am basically making a list of objects that need to be deactivated rather than destroyed and then reactivated upon player death. The main purpose of this opposed to a room restart is to maintain certain surfaces in the room to show players where they...
  9. O

    GML [SOLVED] Emulate mouse event

    I have a parent object called piece, and two children, white and black. In the room, we just have the white and black pieces. When a player clicks on a piece, it should change its value and sprite. If I use the mouse event in the parent, with the following code, it works fine: value++...
  10. U

    How to compare indefinite amount of parents

    So here is the setting: Let's say I have a giant object parent tree, to keep it simple I'll have it be linear. So for example: obj_parent1 obj_parent2 //child of obj_parent1 obj_parent3 //child of obj_parent2 /* skip a few */ obj_parent50 //child of obj_parent49 I have these 50...
  11. R

    I've a parent and object recognising code[SOLVED]

    So I've an object with a parent object but it doesn't recognise my code of that parent when I compile slider_value = obj_options_menu_controller.surf_height; instance_create(0,0,obj_vbar); obj_vbar_parent.scroll_power = 10; obj_vbar_parent.slider_px_height = sprite_height...
Top