How to Exclude Game Controls touches for certain actions?
In my game, I have a ships flying around and you can touch them to target them. The currently selected target shows its stats in a frame of the HUD. Selecting only one target works mostly (if there are 2 ships on top of each other, it selects both).
But I would like the player to be able to move and fire their weapons while keeping the target selected. Currently, a touch anywhere outside the actor deselects it.
I am using the crossplatform control template by GS as the basis of my controls.
I have tried making rules like:
When all conditions are false; up is pressed, down is pressed left is pressed...
do action.
But I cant seem to find the right effect.
Anyone have any suggestions?
But I would like the player to be able to move and fire their weapons while keeping the target selected. Currently, a touch anywhere outside the actor deselects it.
I am using the crossplatform control template by GS as the basis of my controls.
I have tried making rules like:
When all conditions are false; up is pressed, down is pressed left is pressed...
do action.
But I cant seem to find the right effect.
Anyone have any suggestions?
Comments
gameAttributes: targetX … targetY
on Ship (protoype)
Rule: when
Event: touch is pressed
-changeAttribute: game.targetX To: self.Position.X
-changeAttribute: game.targetY To: self.Position.Y
everytime a different ship is touched the values will change to that ship's X;Y
… aren't the spammers such nasties!
Thanks a lot for the suggestion. But its still plaguing me.
I made a video as a visual aid to explain the issue.
This is me attempting to make actors (HudControlsPressed) and place them over the controls.
These actors just switching a boolean true / false when touched.
I added:
When HudControlsPressed is true: do nothing,
otherwise, deselect.
However the initial deselect rule is when the Target reticle receives touch outside, deselect...
So basically it seems like my rule is being ignored, or isn't true long enough for the other actor to notice, and it still registers the as outside and deselects the target.
Which is a pretty crappy targeting system if i do say so myself :P