How do I fix bullet angle after load game

Get help using Construct 2

Post » Thu Dec 04, 2014 2:00 am

Message: haohao83 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi everyone, I need help to fix the bullet angle issue after load function.

I have setup a capx in this link - https://drive.google.com/file/d/0BxVip1HWK0ETelR2eUhWcmo3UUU/view?usp=sharing

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

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.
B
5
Posts: 2
Reputation: 405

Post » Thu Dec 04, 2014 3:14 am

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.
B
86
S
43
G
71
Posts: 601
Reputation: 43,619

Post » Thu Dec 04, 2014 5:00 am

Yup that solved the issue. Thank you so much :D
B
5
Posts: 2
Reputation: 405


Return to How do I....?

Who is online

Users browsing this forum: Bootfit, Huemerson, jorgmaquoi and 5 guests