Sprite is moving, or not?

For questions about using Classic.

Post » Mon Aug 26, 2013 5:30 pm

Just know only x and y position. Nothing more.

How to know, that if sprite is not moving 2-3 seconds? And if its true -then destroy it.

U dont know animation or anithing other, just x and y position.

B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Aug 26, 2013 6:01 pm

You can try this: store x and y position, check x y position every 1second if it changes, update X Y position and set "active" to true.

If active false every 1 second add 1 to "seconds inactive", after seconds inactive is greater than 2 or 3 (your choice) destroy the object
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
113
S
39
G
17
Posts: 2,184
Reputation: 19,217

Post » Mon Aug 26, 2013 6:37 pm

Thancks Jay Jay, will try... On times i maked this example: http://yadi.sk/d/LjHWzafY8LfrL
But equaliti between an vectors work bad on CC, or i doing something wrong? Beacuse text never is STOPPED. But we see that coord are equals.Vicu2013-08-26 18:39:22
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Aug 26, 2013 7:13 pm

Yah... Its a problem of Construct, he cant compare a vectors(sprite.xy)... So i just need to use sprite.x and sprite.y separated.

Or someone can compare vectors?
B
5
S
2
G
5
Posts: 97
Reputation: 2,826

Post » Mon Aug 26, 2013 7:27 pm

Here i used x and y separate and it works fine, thanks.
http://c2community.ru/forum/download/file.php?id=1290
B
5
S
2
G
5
Posts: 97
Reputation: 2,826


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests