Spawning problem while scroll-to is on...

Get help using Construct 2

Post » Sat Aug 15, 2015 2:07 pm

Hi folks!

I'm about to copy the "Geometry Dash"-game for education.

My question: How is it possible to get the absolute x-position value of a sprite? It seems, that, when scroll-to is enabled, the "spawn another object" or even "create object"-action doesn't work when using the Sprite.X | Sprite.Y-values...

When I turn off the scroll-to-behavior, it works... but I need this behavior in order to get the game done.

Reproduce the problem in the demo below by once jumping on the first triangle... (it works) BUT THEN jumping on the second or third triangle (the explosion doesn't spawn at the right position)...

DEMO: http://gertschp.myhostpoint.ch/PositionProblem
CAPX: http://gertschp.myhostpoint.ch/PositionProblem.capx

Thx for your help!
Cheers!
Philip
B
4
Posts: 17
Reputation: 220

Post » Sat Aug 15, 2015 2:11 pm

In the capx you linked I don't see any events for spawning/creating..
Could you explain what you would like to happen and when?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Aug 15, 2015 2:29 pm

Sure!

You'll find the "create object"-action in the part where you see the "on collision with Nagel" ...

There it should create the particle object called "Explosion" at the exact same place, where the sprite "Spieler" stands. But it's obvious that it doesn't work as long as the "scroll to"-behavior is enabled...

Can you see the problem?

Thx for your help!
B
4
Posts: 17
Reputation: 220

Post » Sat Aug 15, 2015 3:37 pm

Fixed!

Image

You were creating the explosion on the background layer and the parallax was messing it up.
B
27
S
5
G
1
Posts: 62
Reputation: 2,367

Post » Sat Aug 15, 2015 3:43 pm

Oh. My. Gosh.

... where has my brain gone. It must be somewhere...

THANKS :D

Cheers from Switzerland!
Philip
B
4
Posts: 17
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: David181 and 13 guests