'on created' angle changing does not when spawning

Bugs will be moved here once resolved.

Post » Thu May 16, 2013 10:03 pm

Link to .capx file (required!):
https://www.dropbox.com/s/xpp3lfws3ps890f/bugging%20out.capx

Steps to reproduce:
1. Load layout 'Level 1'


Observed result:
Bullets spawned will always attach to the angle of the turret, even up to 0.019 seconds after being fired. This means you can't set the angle of the bullet 'on created', as it will always just revert to the turret angle.

The turret waits 0.016 seconds to change angles which is the lowest amount I could get to where it will still occasionally change the angles. So you will see some flying off now and then, but the bulk of them heading directly straight. Remove the wait timer to see them all go straight or set it to 0.02 or higher to see them consistently change angles after that time.

Also the 'on created' angle changing works fine on other objects, until they move. You can see this by controlling sprite6 using the arrow keys. The will spray off in all direction, until you hold up/left/down, but strangely it will work normal when facing right.

Lastly, if you use 'system > create object' instead of spawning the object, on-created angle adjustments work.

Expected result:
All shots fire with randomised accuracy.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 8 and don't know

Construct 2 version:
130    
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Mon May 20, 2013 3:47 pm

Closing as won't fix: 'spawn' is implemented as 'create' followed by 'set position' and 'set angle' to the object spawning. Therefore the spawn will override anything set in 'On created'. To work around this, as you noted just use the system Create instead.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests