CutThroat Neko
Member
Hello.
I have a HUD object already drawing sprites through its Draw Gui event, to display my, well, game's HUD.
Nothing fancy codewise, it just get some values from the player object and display them. (Ok. I have a carrousel animation effect in gml triggered at update, but whatever)
What I want to do is :
1. Using some of those sprite in a Sequence asset I'll use under some conditions (like no energy, etc)
2. Swaping the sprites with the Sequence, I then stop drawing them individually and draw the Sequence instead.
3. Once the Sequence ends, I go back to draw those sprites.
The issue is I use the GUI layer to draw the HUD and sadly, setting the position of an Sequence instance is done at its creation with
The two easiest workaround I can think of are also the ones I would like to avoid :
Any ideas ?
I have a HUD object already drawing sprites through its Draw Gui event, to display my, well, game's HUD.
Nothing fancy codewise, it just get some values from the player object and display them. (Ok. I have a carrousel animation effect in gml triggered at update, but whatever)
What I want to do is :
1. Using some of those sprite in a Sequence asset I'll use under some conditions (like no energy, etc)
2. Swaping the sprites with the Sequence, I then stop drawing them individually and draw the Sequence instead.
3. Once the Sequence ends, I go back to draw those sprites.
The issue is I use the GUI layer to draw the HUD and sadly, setting the position of an Sequence instance is done at its creation with
layer_sequence_create()
and then can be moved with sequence_x
and sequence_y
, but those are relative to the room coordinate.The two easiest workaround I can think of are also the ones I would like to avoid :
- Create an object for each sprite I want to use in my Sequence in order to use their own Draw Gui event. Thing is it's overkill in my case because I don't need all the feature of an Object Assets (varaibles, events and Co) and that's nullify the point of just using sprite for a basic HUD.
- Update the position of the sequence in the room relative to my camera view like good'ol day GM8 which nullify the use of having a Draw Gui event and, actually, is just plainly disappointing and boring to do XD
Any ideas ?
Last edited: