Check for mirrored state

Get help using Construct 2

Post » Sun Nov 27, 2011 7:32 am

Hi is it possible to check the current mirrored state of a sprite?
B
16
S
5
G
1
Posts: 43
Reputation: 1,595

Post » Sun Nov 27, 2011 7:58 am

Right now, no, there's no way to specifically check for it. The easiest way to set it up so you CAN check is to have a private variable that controls whether or not the sprite is mirrored, like so:

On Right Arrow pressed
-- Set Direction to 1
On Left Arrow pressed
-- Set Direction to -1

If Direction = 1
-- Set sprite to Not Mirrored
If Direction = -1
-- Set sprite to Mirrored

Having a variable like that has plenty of nifty uses depending on what type of game you're making.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Nov 27, 2011 8:01 am

Thanks Sully - makes sense
B
16
S
5
G
1
Posts: 43
Reputation: 1,595


Return to How do I....?

Who is online

Users browsing this forum: Nifl and 21 guests