Differenciate between instances

Get help using Construct 2

Post » Sat Feb 23, 2013 6:14 am

here's my problem: I'm trying to make a system where each enemy has a Line of sight field and when the player they react to it as long as the player stays inside, atm i've been able to make it work for any given enemy as long as there isn't more than 1 enemy with the player inside its LoS field. The thing is I'm using the "is colliding with" condition to detect the player inside the field, and since it can't differenciate between each instance, as long as the player stays inside ANY field the condition will return true.

Any help would be appreciated.

PS: I can't use the "pick" conditions because I need it to be able to work with more than 1 enemy at the time.HugeCorporation2013-02-23 06:15:15
B
5
Posts: 4
Reputation: 708

Post » Sat Feb 23, 2013 6:46 am

Need more info on how you're dealing with the LoS field. Is it it's own sprite? If so, then you want to use a container

If you put the sprite you're using for your detection field in a container with the enemy sprite...when a specific field is picked, it will automatically pick the enemy in that container.

If you're going about it some other way, then you'll need to provide us with a capx or some code to look at.
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Sat Feb 23, 2013 7:01 am

I too would like to see a capx on this as I think it is the same issue I will bump into for a future project I have in mind.
B
31
S
8
G
5
Posts: 436
Reputation: 5,836

Post » Sat Feb 23, 2013 4:03 pm

[QUOTE=theubie] Need more info on how you're dealing with the LoS field. Is it it's own sprite? If so, then you want to use a container

If you put the sprite you're using for your detection field in a container with the enemy sprite...when a specific field is picked, it will automatically pick the enemy in that container.

If you're going about it some other way, then you'll need to provide us with a capx or some code to look at.[/QUOTE]

that's exactly what I needed... sorry I didn't include the .capx, will do in future posts, tahnk you for the fast response
B
5
Posts: 4
Reputation: 708


Return to How do I....?

Who is online

Users browsing this forum: Governador, RookieDev, tarek2, Thelegendvinny and 18 guests