Problem Description
In this code the set angle of motion of the bullet behaviour doesn't seem to register if called inmediately after enabling the behaviour.
Attach a Capx
CAPX
Description of Capx
The capx simulates a simple hit points indicator. The idea is that when losing HP, each heart sprite falls down using bullet behaviour at 90º.
Steps to Reproduce Bug
Pressing any key takes off 1 HP
Observed Result
Hearts move at 0º angle despite a 90º (falling down) angle being specifically set.
Expected Result
The sprites should move down. Strangely enough, if a minimal wait is made (toggle on the only disable action in the capx) the intended motion angle works. It seems it needs at least a frame for some reason.
Using a way simpler example setting an angle after enabling bullet behaviour works just fine. Maybe it has to something to do with objects spawned on runtime?
By the way, moving the set angle action to the part of the code that spawns the sprite doesn't work either, neither does putting it on an on created event for the sprite.
Affected Browsers
- Chrome: YES
- FireFox: YES
- Edge: YES
Operating System and Service Pack
Windows 10 60-bit 1709
Construct 2 Version ID
250 64 bit (Also fails on C3)