flyinian
Member
Correct me if I am wrong:
If I have an object and I place it into a room, that object in the room becomes an instance of said object. That instance will be at the x and y position that I placed it at in the room. All is fine, however it is recommended to code your x and y positions within that object to prevent issues coming up later. What code(s) do I use to place the object(instance) in the room. Do I use instance _create_layer? or do I use draw_sprite_ext? or is there another code to use?
here are questions:
1. If I use the draw_sprite_ext(or another similar code), will the surface(the interact-able surface for mouse click and such) of that object be the size of the sprite(a.k.a the collision mask of said sprite)?
2. If I place an object into a room and have code within the said object that creates it in the room, will it create two of the said object, since one is in the room and a line of code is also making it?
For clarification of what I want:
I want to place an object into the room with a given x and y position within the room. I then want to be able to use that object for mouse clicks, mouse hover reactions and so forth...What code(s) do I use to achieve this.
I am currently using a master object I place into a room with no x or y position or sprites w/ the "visible" check box unchecked This master object creates the instance of the object I want in the room using the "instance_create_layer_" code within it's "create" event. That object that is created by the master object, creates all of the other instances of the other objects. Master object > which spawns a menu background > that menu background spawns in all of the buttons.
Thank you.
If I have an object and I place it into a room, that object in the room becomes an instance of said object. That instance will be at the x and y position that I placed it at in the room. All is fine, however it is recommended to code your x and y positions within that object to prevent issues coming up later. What code(s) do I use to place the object(instance) in the room. Do I use instance _create_layer? or do I use draw_sprite_ext? or is there another code to use?
here are questions:
1. If I use the draw_sprite_ext(or another similar code), will the surface(the interact-able surface for mouse click and such) of that object be the size of the sprite(a.k.a the collision mask of said sprite)?
2. If I place an object into a room and have code within the said object that creates it in the room, will it create two of the said object, since one is in the room and a line of code is also making it?
For clarification of what I want:
I want to place an object into the room with a given x and y position within the room. I then want to be able to use that object for mouse clicks, mouse hover reactions and so forth...What code(s) do I use to achieve this.
I am currently using a master object I place into a room with no x or y position or sprites w/ the "visible" check box unchecked This master object creates the instance of the object I want in the room using the "instance_create_layer_" code within it's "create" event. That object that is created by the master object, creates all of the other instances of the other objects. Master object > which spawns a menu background > that menu background spawns in all of the buttons.
Thank you.
Last edited: