Writerstix77
Member
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 and use it to interact with something in the environment (pipe_obj). My desire is to have the cursor icon turn into the inventory image after it is selected (LMB), and remain that way until it is either used or intentionally changed back to the cursor.
I achieved this effect in GM 8.1 but had to use 3 different objects (wrench_obj, wrench_inv, and wrench_cursor). This seems incredibly redundant since the _inv and _cursor images were identical. I also had to code every single object as I hadn't had a firm understanding of parenting at the time.
I'm new to GMS2 and haven't used any GM product in about 3 years. I've figured out how to change the cursor to the inventory item, but it will not follow the mouse. OR... The cursor sprite and the inventory item both follow the mouse, but immediately after the original object (wrench_obj) is clicked... this is before it even shows in the inventory.
I poured over articles on this and feel I am close. I'm just not making it work. Any thoughts?
TL;DR: How do I make the cursor turn into a different object when clicked? Can I parent this to apply to all objects of this type?
Thanks.
I achieved this effect in GM 8.1 but had to use 3 different objects (wrench_obj, wrench_inv, and wrench_cursor). This seems incredibly redundant since the _inv and _cursor images were identical. I also had to code every single object as I hadn't had a firm understanding of parenting at the time.
I'm new to GMS2 and haven't used any GM product in about 3 years. I've figured out how to change the cursor to the inventory item, but it will not follow the mouse. OR... The cursor sprite and the inventory item both follow the mouse, but immediately after the original object (wrench_obj) is clicked... this is before it even shows in the inventory.
I poured over articles on this and feel I am close. I'm just not making it work. Any thoughts?
TL;DR: How do I make the cursor turn into a different object when clicked? Can I parent this to apply to all objects of this type?
Thanks.