Monster won't follow player

Discussion and feedback on Construct 2

Post » Sun May 05, 2013 7:19 pm

Hello, I'm very new here.

I'm following "the Beginner's guide to Construct 2"

until page 5 where the tutorial told me to use this

Condition: Monster -> Is outside layout
Action: Monster -> Set angle toward position -> For X, Player.X - for Y, Player.Y.

to make monster follow player.

but it just didn't happen when I run the test

Please help,
Thank you very much

https://dl.dropboxusercontent.com/u/17026840/Untitled-1.jpg
B
4
Posts: 7
Reputation: 214

Post » Sun May 05, 2013 8:01 pm

Make sure monster has the bullet behavior and also that you do NOT have destroy outside layout set on your monster. Also I don't see anywhere in your code the logic that spawns new monsters...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Sun May 05, 2013 10:21 pm

Perhaps it's because it's only "following" the player when the monster is outside the layout, rather than inside.
B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Mon May 06, 2013 6:08 am

Thank you for your replies

[QUOTE=Jase00] Perhaps it's because it's only "following" the player when the monster is outside the layout, rather than inside.[/QUOTE]

I add new event
Monster is on-screen : Monster is set toward (Player.X, Player.Y)
                                       under
Monster is outside layout : Monster is set toward (Player.X, Player.Y)

Now it work!! but is this the correct way to do it?
B
4
Posts: 7
Reputation: 214

Post » Mon May 06, 2013 6:11 am

[QUOTE=BluePhaze] Make sure monster has the bullet behavior and also that you do NOT have destroy outside layout set on your monster. Also I don't see anywhere in your code the logic that spawns new monsters... [/QUOTE]

Thanks for the tip but I haven't reach that part of the tutorial yet but could u please tell me how to spawn a new one? I can't find it in the beginner guide
B
4
Posts: 7
Reputation: 214

Post » Sat Jun 15, 2013 5:18 pm

Maybe this behaviour is set on your "Monster" object: "Destroy outside layout".

I had the same problem, just removed that behaviour and it worked !
B
4
Posts: 2
Reputation: 216


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests