Object not detected in a specific area [SOLVED]

Get help using Construct 2

Post » Fri Jun 05, 2015 4:44 pm

Hi,

Image

im making a stealth game, and what i want is :

- the player will be safe in a specific area (box in the example) from the camera

- if he move one pixel from the area, he will be detected

i think i do it wrong
Image

here is my capx :

Code: Select all
https://dl.dropboxusercontent.com/u/138507172/safe_area_from_camera.capx


thank you a lot
Last edited by Hunter on Mon Jun 08, 2015 11:22 am, edited 1 time in total.
B
4
S
1
Posts: 40
Reputation: 532

Post » Fri Jun 05, 2015 5:30 pm

Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Fri Jun 05, 2015 6:04 pm

thank you briggybros,

it works, but not in this two case, the camera can't detect him

Image
Last edited by Hunter on Fri Jun 05, 2015 10:50 pm, edited 1 time in total.
B
4
S
1
Posts: 40
Reputation: 532

Post » Fri Jun 05, 2015 7:20 pm

Sorry, I only considered it for one player. If you take the event which is "for each box" and make it a sub event of a new "for each player" loop then that should work.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Fri Jun 05, 2015 7:47 pm

actually i mix two screenshots in one, there is only one player
B
4
S
1
Posts: 40
Reputation: 532

Post » Sun Jun 07, 2015 7:51 pm

help please ^^
B
4
S
1
Posts: 40
Reputation: 532

Post » Sun Jun 07, 2015 8:57 pm

safe_area_from_camera_edit.capx (r206)

I just put another sprite around the box to detect if the player is slightly outside the box.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,620

Post » Mon Jun 08, 2015 11:20 am

yeees it works !! it's a smart way to do it! thank you very much ramones you made my day :D
B
4
S
1
Posts: 40
Reputation: 532


Return to How do I....?

Who is online

Users browsing this forum: MaujDeveloper, mtnboy22, muquia, user5487 and 3 guests