Wierd angle setting issues

0 favourites
  • 3 posts
  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)