System will not change instance variable

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello. The system will check for four conditions and make changes when those are met. It is correctly making changes for two of the conditions, but not for the other two. By using a text box, I have made sure the conditions are met, but still no changes. If i change the condition in the start of layout, the appropriate changes are made, but not afterwards.

    Any clues to what is going wrong?

    Thanks in advance.

  • Posting a capx is better.

  • Here is the CAPX.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I fixed it. Ended up changing conditions for Enemy.Bullet.AngleOfMotion = 0 and Enemy.Bullet.AngleOfMotion = -90 to having a double condition checking if it is grater that -20 and less than 20 for the 0 case and grater than -110 and less than -70 for the -90 case. If anyone figures out why it does not work with the "=" case, please let me know as it is a simpler solution.

  • edescamps

    I was going to reply earlier but work got busy so you found a fix before I could get back to it. However, I am attaching a modified version of you project anyway. I think you might find it useful. This version cuts down your event system substantially. I modified the player direction to be a number like the enemy direction variable and added a state variable to each. With that, setting animations and the direction of the boomerang takes far fewer events. Take a look and see what you think.

    I hope this is of use to you and good luck with your project.

  • Awesome! Thanks Frag.

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