Enable movement on-screen or at X distance ?

Get help using Construct 2

Post » Mon Sep 02, 2013 2:45 am

I'm still fresh with this program, and I was wondering how one would go about making it so that an object or sprite ( specifically enemies ) do not start moving or anything until the player is within a certain distance from the enemy, or until the enemy is on the player's screen.
B
3
Posts: 4
Reputation: 183

Post » Mon Sep 02, 2013 4:17 am

The simplest way would be to use the built in 'is on screen' condition

+If Enemy is on screen     >move enemy

I left 'move enemy' ambiguous because it depends on how you are moving him, a behaviour? platformer or 8direction? or your own movement with events?
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Sep 02, 2013 5:33 am

Platformer, I tried "is on screen" condition before, but it didn't work. Is there something else I have to add ?
B
3
Posts: 4
Reputation: 183

Post » Mon Sep 02, 2013 5:46 am

what was the action that followed?

I suspect that the condition was being met fine, just the action wasn't right..
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Sep 02, 2013 4:50 pm

Right now I have it as:

System, on Start of Layout: Set Sprite Custom Movement to Disabled
|
|
--- Sprite, is visible: Set Sprite Custom Movement to Enabled
                          Set Custom Movement Horizontal Speed to 100
B
3
Posts: 4
Reputation: 183


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests