sprite doesn't keep up with other sprite

For questions about using Classic.

Post » Sun Jan 30, 2011 2:17 am

I have two problems, one is that my arm sprite will lag behind my person sprite, and that I can't get my physics bullet to stop colliding with itself. Here's the .cap.

[url=https://docs.google.com/uc?id=0B9d5pqOItfvfODI2OTlmNTEtNmFiOS00NWUxLWIxODktYzRiNTIwOTRlMWNi&export=download&hl=en:3v6xatxl]Download[/url:3v6xatxl]
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Sun Jan 30, 2011 10:38 am

1. To make position stop lagging: Swap your include event sheets around (make weapons appear after general). Because your weapons were positioning themselves (on old coordinates) before you set positions of the body in the general sheet.

2. Don't know what you mean about them colliding itself, but I also don't think you should be using physics on bullets. Just use custom movement behaviour.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Tue Feb 01, 2011 1:12 am

@alspal, can you expand on that first thing a bit? I don't quite understand what you mean. I have a similar issue sometimes, but I am sure my workaround is overly tedious and a bad way to do it. How can I stop the lag? Could you perhaps make an example?
B
2
G
3
Posts: 46
Reputation: 942

Post » Thu Feb 03, 2011 1:43 am

Okay.

So basically, you want to have the positions of the things set in order. Basically what was happening in his .cap was that:

1. The gun is positioned to the body

2. The body position changed

So the gun appeared to lag behind, it wasn't keeping up. So its important to realise how the order matters, it should be:

1. The body position changed

2. The gun is positioned to the body.

No lag now!

Here's a cap that demonstrates this:
http://dl.dropbox.com/u/1024727/laggypositions.cap
(swap the events in the event sheet around to notice difference)
B
4
S
1
G
1
Posts: 63
Reputation: 776


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests