turn the other side

Get help using Construct 2

Post » Sun Mar 31, 2013 6:49 am

so i made a simple monster and a character, and i made the monster go after the player when on sight, the problem is, when i go to the other side, the monster is still facing the left side... so how can i make it so that when im on the right side he turns right? and when im on the left he turns left.

--> https://www.dropbox.com/s/k16h5y1luvqj9ee/Enemy.capxkionysan2013-03-31 06:51:04
B
5
Posts: 77
Reputation: 604

Post » Sun Mar 31, 2013 6:58 am

use Flip action on Left press
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Sun Mar 31, 2013 7:01 am

no, not the character, i want the monster to turn...
B
5
Posts: 77
Reputation: 604

Post » Sun Mar 31, 2013 7:13 am

[QUOTE=kionysan] so i made a simple monster and a character, and i made the monster go after the player when on sight, the problem is, when i go to the other side, the monster is still facing the left side... so how can i make it so that when im on the right side he turns right? and when im on the left he turns left.

--> https://www.dropbox.com/s/k16h5y1luvqj9ee/Enemy.capx[/QUOTE]


Add these two lines of events and it should work: Look at image below.




Pseudo Code:
Character.X >/ monster.X, then monster is mirrored
Character.X </ monster.X, then monster is not mirroed

>/ means greater than or equal to
</ means less than or equal to

If you still need help then post a response to my message as a quote so I can get updated on your replyretrodude2013-07-03 22:30:34
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sun Mar 31, 2013 7:33 am

[QUOTE=retrodude] [QUOTE=kionysan] so i made a simple monster and a character, and i made the monster go after the player when on sight, the problem is, when i go to the other side, the monster is still facing the left side... so how can i make it so that when im on the right side he turns right? and when im on the left he turns left.

--> https://www.dropbox.com/s/k16h5y1luvqj9ee/Enemy.capx[/QUOTE]


Add these two lines of events and it should work: Look at image below.

http://imageshack.us/photo/my-images/59/helpguy.png/


Pseudo Code:
Character.X >/ monster.X, then monster is mirrored
Character.X </ monster.X, then monster is not mirroed

>/ means greater than or equal to
</ means less than or equal to

If you still need help then post a response to my message as a quote so I can get updated on your reply[/QUOTE]

it works perfectly, i dont know how it will turn out to be when i apply an animation, but thanks anyways :Dkionysan2013-03-31 07:34:05
B
5
Posts: 77
Reputation: 604


Return to How do I....?

Who is online

Users browsing this forum: Khamsou, nedzad and 12 guests