I'm trying to figure out how to make a UI/imagebutton element not be affected by the transform that causing the rest of the screen to move.
I have an imagemap where the screen has a minor shake/swaying affect on it (to emulate the effect of a boat out at sea). The player can click on various doors on this shot to access different parts of the ship. There's also a bottle that the player can pick up that I've created as an imagebutton.
I'm using a custom transform to create the illusion of motion. That looks like this:
Code: Select all
init-2:
transform ship_sway:
ypos 0
linear 0.8 ypos -5
linear 0.8 ypos 0Code: Select all
screen imagemap1:
imagemap at ship_sway:
ground "imagemap1"
hover "imagemap1 hover"
hotspot (548, 131, 181, 84) action Jump("room1")
hotspot (889, 40, 194, 304) action Jump("room2")
imagebutton auto "bottle_%s.png" action Jump("bottle1") xpos 25 ypos 500 focus_mask True
But then, what if I also wanted to have a UI icon that was clickable during this imagemap that WASN'T affected by the ship_sway..?
I was thinking of adding this UI element (in this case, a journal icon that you can click on to reach the pause menu) as an imagebutton, but whenever I do this, it also sways with the rest of the imagemap..
Is there any easy way of showing this UI/imagebutton during the imagemap without it inheriting the transform properties of the rest of the imagemap?