Why not good

Get help using Construct 2

Post » Tue Apr 21, 2015 12:11 am

From among the two examples why the second is out of order?
------------------------------------------------------------------------------------------------------------------------------
This works:
// If a monster is within 200 pixels of the player, make it start rotating towards them.
System | For each Monster | Monster | Rotate 1 degres toward (player.x, player.y)
System | distance(Player.X, Player.Y, Monster.X, Monster.Y) < 200 |
--------------------------------------------------------------------------------------------------------------------------------
Not Works why?:
System | Every tick | Monster | Rotate 1 degres toward (player.x, player.y)
System | distance(Player.X, Player.Y, Monster.X, Monster.Y) < 200 |

If the every tick recurs with true one always,why the monster does not want to turn then if I am near to it than 200 pixels?
Last edited by LordViperion on Tue Apr 21, 2015 12:52 am, edited 8 times in total.
B
14
S
2
Posts: 66
Reputation: 776

Post » Tue Apr 21, 2015 12:12 am

Your images are too small to see.
B
8
S
2
Posts: 39
Reputation: 604

Post » Tue Apr 21, 2015 1:26 am

Please help me understand.
B
14
S
2
Posts: 66
Reputation: 776

Post » Tue Apr 21, 2015 4:36 am

When you say "For each", the event executes against every instance of monster. Without the "for each" it is not clear if it will test each monster, or only one instance of monsters.
B
28
S
10
G
10
Posts: 97
Reputation: 6,584


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 53 guests