parent

  1. Masstertron

    instance_destroy() doesn't work on parent objects

    Hi everyone! (GMS 2.3) I've noticed that using instance_destroy() doesn't work for children objects. For example, when I use instance_destroy(obj_enemy), my expectation is that all enemies, including child-object enemies (eg: obj_enemy_bird, obj_enemy_fish) are destroyed. What happens is no...
  2. FullCup

    GML Collision with specific instances of an object

    I'd like to put an instance of an object into a "collidable group" in some cases. For example: If the player collides with a "water coin" INSIDE the water, he CAN collect it (just an example). My first thought was to change the parent just before the collision check and then return to the...
  3. theshaggyfreak

    Windows Events List (child inherit issue)

    I've come across something that I'm not sure if it's by design or if it's a bug. If I had an object as a child of another object that has a particular event, said event does not always show up in the child's event list dialog box right away. If I close the dialog box and reopen it, the event...
  4. William Garrison

    GMS 2.3+ Variable not working?

    So simple enough. I am trying to make a parent asset that utilizes the in room variable for what object is being controlled and/or called. But the game doesn't seem to be recognizing it. So here is the setup... Inside the Step Event if (triggered = 1) { instance_create_layer(oHero.x+150...
  5. P

    SOLVED How to compare return of the parent_get function

    Hello everybody, probably the heading for this thread sounds strange but I Really have troubles when dealing with function object_get_parent and object_index variable, so what I want to achieve is simply make one object perform the action depending on what it collided with, so For Example, if...
  6. flyinian

    SOLVED Parent and first child have same index/id?

    I am having trouble updating data when switching what is being selected(think of items in a store and when you click different items, it gives different data for each item). This is determined by the object's index/id when clicked. I noticed that the parent and first child of said parent has the...
  7. Writerstix77

    changing cursor to different objects

    I am trying to create a Room Escape Game and am having trouble with the mouse. I want to be able to have the user click on an item in the room (wrench_obj), and have it stored in the inventory off to the side (as wrench_inv). I then want the player to later be able to click the inventory item...
  8. M

    child with multiple parents (grouping objects)

    Hi guys I just figured out, that a child object can have just one parent. I would like to group some objects for different collision checks and behaviours, but some objects has to be in multiple groups. How can i solve this? Example (Pseudo code)...
  9. lluuze

    Hitboxes + Enemy Parent Issue

    Hello all, I've been experiencing some problems with the hitboxes and enemy parent. Once the player's character collides with the enemy, they become stuck but before I made changes to the player's sprite; everything was fine and working. I recently switched back to the original sprite to fix...
  10. F

    How to override parent create event

    So very simple issue thats more of a coding pet peve than anything. Basically the parent of an object has creation code that is semi long and nothing needs to be changed except for a few variables. So when the child has a create event with "event inherited" even when the code after sets the...
  11. S-4

    object w parent (child object) not being created

    hi all, im not new to gml but i havent touched it in about a year and im having trouble creating a child object. so i have a parent button object (o_par_button) with two child button objects (o_button_green and o_button_red). im trying to create the child button objects in-game via another...
  12. Antikore

    Legacy GM Parents are broken

    I'm having a lot of trouble and issues when trying to use parents with my objects in my game. Until now, they were working good, but I added a level editor to my game and when importing a level into the real game, I have multiple issues when things are changed. One of them is the most obvious to...
  13. mbeytekin

    Changing Spine Bone Parent

    I tried with skeleton_bone_state_set and skeleton_bone_data_set for changing a bone's parent to "root". But it doesn't work. in documentation; var bone_map = ds_map_create(); skeleton_bone_data_get("head", bone_map); ds_map_replace(bone_map, "parent", "body"); skeleton_bone_data_set("head"...
  14. Yizzard

    GMS 2 Question about spawning instances of children

    So I have this system where all items (weapons, consumables, etc.) are children of an overarching obj_Item. It's children are obj_Weapons, obj_Consumables, etc. which in turn are the parents to obj_SteelSword, obj_BucketOGoo, etc. which are actual items. I wanted to have an item bank that...
  15. T

    GML How to share the path function to multiple objects ?

    I want to make a path function in a parent object so the child object could use it to.I've tried many things but it seems the path function could only apply to one object at a time. Luckily i've stumbled upon this tutorial: If you don't have the patient i'll expain: Basically the guy told...
  16. F

    Legacy GM (SOLVED) Quick query with regards to object parents?

    Hi Everyone! I was planning out some objects in a project --and planning some parental hierarchies--and stumbled across a query I have never got to the bottom of: When it comes to parents, children, and inhereted code/events, do parents or children 'overwrite' certain blocks of code or events...
  17. P

    Trying to make a global z axis

    Hey everone, using this video I was able to get a zaxis implemented, although I don't fully understand it. Is anyone able to explain to me which part of this sets the z axis. I'm trying to make a script or a parent object that sets a z axis for all objects that may be floating or jumping. And...
  18. F

    Child Object Switching xscale (-1 and 1)

    I have a parent object which works fine, and created a child object and changed nothing about its code or variables. When I place the child object in a room, it walks normally and then rapidly switches between being left-oriented and right-oriented, when the object would normally jump. The...
  19. P

    GMS 2 Struggling with game behavior inconsistencies between objects that share the same code.

    I'm using Game Maker Studio 2 v2.2.1.287. I've included a short video link at the bottom that showcases my problem. I've begun prototyping an "Inventory Simulator" game where the basic concept is you're supposed to pick items up of various shapes and sizes, and fit them into your limited...
  20. F

    GML how to store multiple kinds of instances with their x and y coordinate

    basically what I'm trying to do is make it so that when the player presses Z, each instance of every object parented to a parent object is stored but is no longer in the room and a new setup is drawn, and when the player presses Q, the new setup is stored and the old one is shown and i need to...
Top