LineOfSight + PathMovement.

For questions about using Classic.

Post » Sat Oct 09, 2010 6:49 pm

Hello.
I'm trying to use LineOfSight behavior with PathMovement.
I have three objects: hero (black circle), enemy (red circle) and wall (black square). Wall and enemy are solid. Hero have 8-directional behavior, enemy have LineOfSight behavior with PathMovement and wall doesn't have one.
Enemy is set to move around with his path. When he see hero, he must stop following the path and follow the player. When he lost hero from sight, he must get back to his route and follow it again.
It's kinda hard and I don't really know how to do this. Maybe somebody can help me.

I made something like this, but it doesn't really work as it should (the enemy is teleporting over the screen and starting his path from start):
http://img227.imageshack.us/img227/8205/93787897.png
http://img98.imageshack.us/img98/8906/79356069.png
http://img412.imageshack.us/img412/143/34550063.png
(cap) http://www.sendspace.com/file/v2adkx
B
1
G
3
Posts: 2
Reputation: 829

Post » Sat Oct 09, 2010 8:26 pm

There is a solution in this topic:
[url:1ek32u5d]http://www.scirra.com/forum/viewtopic.php?f=3&t=5999&p[/url:1ek32u5d]
B
79
S
24
G
54
Posts: 4,740
Reputation: 40,743

Post » Sat Oct 09, 2010 8:56 pm

Ow, thanks. I used a Search option, but didn't found it.
B
1
G
3
Posts: 2
Reputation: 829


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests