[SOLVED]Spawn instances of spr from same spr

Get help using Construct 2

Post » Tue Feb 05, 2013 11:41 pm

'System: Create Sprite' picks the newly created Sprite.

'Sprite: Spawn Sprite' doesn't pick the new Sprite - the original one remains picked.ramones2013-02-05 23:41:26
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Wed Feb 06, 2013 8:03 am

[QUOTE=ramones] 'System: Create Sprite' picks the newly created Sprite.

'Sprite: Spawn Sprite' doesn't pick the new Sprite - the original one remains picked.[/QUOTE]

@ramones Wow! Thank you ramones, this is exactly it.

In the end it was not a bug or a limitation. I think it's an undocumented behavior (as the manual entry for 'Create Sprite' and 'Spawn Sprite' do not mention this difference) that comes to light *ONLY* when the same sprite is spawning instances of itself.

To explain it even better, we all thought that 'Spawn' ALSO picked the spawned object because code like the following would run without problems (again sorry for not embedding I can't seem to tame Google Drive for that):
It seems like spawn it's picking but its not

But the reality is, as ramones said, that Spawn *DOES NOT* pick the created instance (it just happened to get picked when we were spawning different instances because it was the most recent instance for the 2nd sprite in that scope).

Thanks everyone, I am adding "SOLVED" to the topic.Alcemon2013-02-06 08:05:35
B
19
S
4
G
4
Posts: 70
Reputation: 3,896

Previous

Return to How do I....?

Who is online

Users browsing this forum: Lof and 4 guests