"Set position to" isn't quite working...

Get help using Construct 2

Post » Thu Oct 13, 2011 7:09 am

Here's my cap:

http://db.tt/61FvHuSV

I had a camera system, but disabled it so one thing would become obvious: whenever you enter a new animation (or not -- see edit at the bottom), the sprite assigned to the invisible platform object teleports to 0,0 for a single tick. That little number in the top left increments every time the sprite's X is less than 20 -- if you walk around for a few seconds, you'll see it go up pretty quick.

The thing is, it WON'T increment if you're testing the actual platform object's X value, meaning the problem must lie within the event setting the sprite's position to the object. It's a simple "Every tick" event, and absolutely no where else do I change the sprite's position. I'm led to believe it might be a bug or something, but I can't be sure.

EDIT: I disabled ALL the event sheets other than 1-1 and Mario and the problem persists, so you don't have to look in any others. Actually, I just disabled all the animations and it STILL happens, so the problem isn't even in changing animations. I'm stumped.SullyTheStrange2011-10-13 07:09:43
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Thu Oct 13, 2011 8:52 am

Where are the relevant events? It is very confusing for other people to try and find their way around unfamiliar projects.

My first instinct is that everything is working correctly but your events are set up so it takes one tick for the object's position to be updated.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Oct 13, 2011 9:06 am

Right, sorry -- Mario's Set position to event is the second event of the Mario event sheet, I think. If you mean something else I might have to go check.

Even if it was taking too long to update... why would it teleport to 0,0? Wouldn't it just stay where it was for an extra tick until it can update properly? It's a simple "Every tick" event, so I don't see what else could be keeping it from updating. SullyTheStrange2011-10-13 09:07:40
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Thu Oct 13, 2011 10:18 am

Ah, this turned out to be a really weird bug. It's fixed in the next build. Thanks for the find!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Oct 13, 2011 10:37 am

Hah, sweet. Thank YOU for the fix! I'll await the next release with baited breath!
B
20
S
9
G
6
Posts: 607
Reputation: 6,112


Return to How do I....?

Who is online

Users browsing this forum: Ethan, makkancs, Marxally, Naightwolf, pierre244, Ryogo and 15 guests