T
trademike1982
Guest
Hi All,
This is my first post and first of all sorry for my english it is not my mother tongue so I will explain myself as better as I can (and of course thanks for reading this).
I am creating a tower defense game but I am facing some strange behaviours that I could find neither internet or GMS2 manual. That is the problem:
In the Draw GUI event I am placing some instances of the same object that will represent each kind of "Tower" or "Building" you can create (See picture "GUI buttons" attached). Each instance has a different image_index and the player can hover over one object and some info is displayed (See picture "Tower info" attached). At the moment everything is working fine.
The player can move the camera view position using mouse and here is where the problem occurs. If the user moves the camera view position all the GUI objects remains in the same place (awesome) but it seems that its collision mask change....I mean it is out of its original place....
You can check this out in the last attachment "Collision Mask displaced". I just moved the view up and now the mask of all objects has been moved up too....
Do you know what is going wrong here?
I know that others have drawn the GUI with draw_sprite but in my opinión it is very complicated because and object instance gives you more flexibility to capture events and so...
Thanks a lot
This is my first post and first of all sorry for my english it is not my mother tongue so I will explain myself as better as I can (and of course thanks for reading this).
I am creating a tower defense game but I am facing some strange behaviours that I could find neither internet or GMS2 manual. That is the problem:
In the Draw GUI event I am placing some instances of the same object that will represent each kind of "Tower" or "Building" you can create (See picture "GUI buttons" attached). Each instance has a different image_index and the player can hover over one object and some info is displayed (See picture "Tower info" attached). At the moment everything is working fine.
The player can move the camera view position using mouse and here is where the problem occurs. If the user moves the camera view position all the GUI objects remains in the same place (awesome) but it seems that its collision mask change....I mean it is out of its original place....
You can check this out in the last attachment "Collision Mask displaced". I just moved the view up and now the mask of all objects has been moved up too....
Do you know what is going wrong here?
I know that others have drawn the GUI with draw_sprite but in my opinión it is very complicated because and object instance gives you more flexibility to capture events and so...
Thanks a lot
Attachments
-
4.8 KB Views: 21
-
7.1 KB Views: 21
-
6.8 KB Views: 20