Hello! I just recently started trying to make my own game, so I am really new to this. I've searched on google and on these forums and sadly found nothing besides other people asking for the same. Not sure if this is a case of using different terminologies which is making it difficult to find.
So what I am trying to do is simple in idea. It's a 2D game, I click a button, let's say a barracks button, the barracks will appear on the mouse. Where I click, the barracks will now appear in game and the cursor returns.
I've tried doing this with setting a custom mouse cursor, when I click the button, the mouse cursor changes to the barracks sprite, I click, it spawns an instance of the barracks, the default mouse cursor returns. It worked, except it didn't line up properly to where I wanted it. Close but just a bit off. The top left corner of the barracks sprite was the pointer now but the instance would spawn with the centre point at that location.
Any help or ideas would be greatly appreciated!