Wierd angle setting issues

Get help using Construct 2

Post » Sun Jun 16, 2013 12:44 am

Hi again people!

I am having a weird bug in the project I am developing. I am posting this after pulling my hair out for the last three hours on this issue. So, please help if you think you know how to correct it... thank you! Here is the issue I am facing:

In the game, I want "Monster" to spawn randomly at a location and walk towards the player after the player scores 100 points. After striking out tasks one by one, here is what I found:

When I do this:

System: At Every Tick :: Monster : Set Angle Toward(Player.X,Player.Y)
The monster spawns at the start of the game and walks towards the player. So, its behaving as I had wanted to with that above command.

But, when I use the following conditions:
System : Score >100
System : Score <500
System : Every 10 seconds
System : timescale "not equal to" 0

And use the following actions:
System : Create Object Monster on layer 1 at (random(130,1105),random(30))
Monster: Set Angle Toward (Player.X,Player.Y)

The Monster spawns once the score reaches 100 BUT does not walk towards the player.
Note: The score is a Global Variable.

Please help! Any help would be greatly appreciated. This is the only major roadblock that is remaining for me in this project.
B
5
S
1
Posts: 38
Reputation: 839

Post » Sun Jun 16, 2013 1:21 am

Can you isolate this into a sample CAPX? Either you'll figure it out yourself, by trying to reproduce the problem, or it will be much easier for anyone else to investigate.
ImageImageImage
B
71
S
22
G
259
Posts: 3,794
Reputation: 143,704

Post » Sun Jun 16, 2013 9:20 am

You, good sir, are a genius.

Was creating a separate capx to isolate the problem, when I thought of changing the position of the command to another place, and now its working!
B
5
S
1
Posts: 38
Reputation: 839


Return to How do I....?

Who is online

Users browsing this forum: donstathemonsta, Google [Bot] and 20 guests