How do I fix bullet angle after load game

0 favourites
  • 3 posts
From the Asset Store
Progress\Loading Bar
$2.40 USD
40% off
Progress\Loading Bar. Now Load you game like a Professional.
  • Hi everyone, I need help to fix the bullet angle issue after load function.

    I have setup a capx in this link - drive.google.com/file/d/0BxVip1HWK0ETelR2eUhWcmo3UUU/view

    ========================

    To help troubleshoot the issue via capx:

    [Open Loadgame-BulletAngle.capx]

    [Run 'Menu' Layout]

    [Click on New Game button]

    The monster is spawning bullets with set angle toward Player.X, Player.Y

    Move player around via arrow keys on keyboard to see bullets movement.

    [Refresh the browser to go back to 'Menu' Layout]

    [Click on Load Game button]

    [ISSUE] All bullets on screen would re-set angle towards Player.X, Player.Y every time the monster spawns a new bullet.

    The system will pick all bullets on screen towards angle, is not intended (Unintended homing effect on player). Intend is to set the bullet towards player once per bullet.

    Same with player shooting bullets, the angle is not correct (Spacebar to shoot).

    Perhaps the way which monster bullet target the player should not be coded this way. Any solutions or better way of coding is very much appreciated.

  • bullet - on created

    set the angle.

    on created is a trigger, so it will only happen once for each bullet, so the angle won't change.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yup that solved the issue. Thank you so much

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