How do I make the enemy follow the player

Get help using Construct 2

Post » Sun Sep 03, 2017 1:29 pm

Hi, I am making a top-down twin stick shooter and I need to find out how to make the enemy follow my player when they see him. What behaviors and coding do i use? I already have line of sight down, though, I just need the appropriate behavior and coding.
B
3
Posts: 5
Reputation: 189

Post » Sun Sep 03, 2017 2:45 pm

Pathfinding behavior maybe?
There is a demo pathfinding example in Construct 2 when you start a new project.
Check out my awesome game Doptrix
B
17
S
8
G
8
Posts: 165
Reputation: 5,817

Post » Sun Sep 03, 2017 9:09 pm

@RyukenHirimoto

You can change the Range on the Line Of Sight

https://www.dropbox.com/s/n7gc6s6b4q3b1qs/Follow%2BLineOfSight.capx?dl=0
B
38
S
22
G
60
Posts: 222
Reputation: 34,032

Post » Thu Sep 14, 2017 2:14 pm

Message: RyukenHirimoto can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
tarek2 wrote:@RyukenHirimoto

You can change the Range on the Line Of Sight

https://www.dropbox.com/s/n7gc6s6b4q3b1qs/Follow%2BLineOfSight.capx?dl=0

Yeah but i don't want them to rotate. Anything else?
B
3
Posts: 5
Reputation: 189

Post » Thu Sep 14, 2017 2:33 pm

RyukenHirimoto wrote:Yeah but i don't want them to rotate. Anything else?


For all enemies set "Set angle=no" in Bullet bahavior.
Also in the event sheet replace "Monster: Set angle to" action with "Monster: Set Bullet angle of motion to".
Monsters will follow the player and will not rotate.
Check out my awesome game Doptrix
B
17
S
8
G
8
Posts: 165
Reputation: 5,817

Post » Thu Sep 14, 2017 2:49 pm

dop2000 wrote:
RyukenHirimoto wrote:Yeah but i don't want them to rotate. Anything else?


For all enemies set "Set angle=no" in Bullet bahavior.
Also in the event sheet replace "Monster: Set angle to" action with "Monster: Set Bullet angle of motion to".
Monsters will follow the player and will not rotate.


I think I got it now, thanks.
B
3
Posts: 5
Reputation: 189


Return to How do I....?

Who is online

Users browsing this forum: guannstar and 18 guests