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: 184

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
9
G
48
Posts: 810
Reputation: 26,927

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
39
S
22
G
81
Posts: 297
Reputation: 44,710

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: 184

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
9
G
48
Posts: 810
Reputation: 26,927

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: 184


Return to How do I....?

Who is online

Users browsing this forum: sean080 and 5 guests