8 direction movement not right, sprite jumps

For questions about using Classic.

Post » Tue Jan 29, 2008 9:36 pm

Hi all i have created a simple orange diamond to test 8 direction movement, and when u press it to move it doesn't always just move, it kinda jumps.

Here is the file: http://www.gundam00episodes.com/fff.cap

Just move up and down, you will see it jumps, that's not right, it should just move the sprite itself and thats it.
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Post » Tue Jan 29, 2008 9:49 pm

It's how it works dude, you have to give some Events like:
+Facing Right
-Can't go Left

Etc.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Jan 29, 2008 10:26 pm

I don;t get what that means, to me that says when they are facing right they can't go left??

This movement is useless if when you move another direction it makes the sprite jump!
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Post » Tue Jan 29, 2008 10:44 pm

If it's useless then dont use it, make your own movement.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Jan 29, 2008 11:24 pm

I have tried, but can't get my head around it, there is no option to set a sprite in motion on a click or press of a key.

It just seems stupid that an 8 direction type movement makes a sprite flip itself when going another way, that shouldn't be!
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Post » Wed Jan 30, 2008 1:06 am

[quote="liamdawe":tfm7kge0]I have tried, but can't get my head around it, there is no option to set a sprite in motion on a click or press of a key.[/quote:tfm7kge0]

No, there isn't. You have to make your own:

[code:tfm7kge0]
+Control "Move Left" is down
- Set sprite.X to (sprite.X-5)
[/code:tfm7kge0]

This will move the sprite five pixels to the left every frame while the "Move Left" key is held down. Knowing that, I'm sure you can guess what this does:

[code:tfm7kge0]
+Control "Move Down" is down
- Set sprite.Y to (sprite.Y+10)
[/code:tfm7kge0]


[quote="liamdawe":tfm7kge0]It just seems stupid that an 8 direction type movement makes a sprite flip itself when going another way, that shouldn't be![/quote:tfm7kge0]

It flips itself so that when you quickly change to the opposite direction you don't have to wait for the sprite to rotate all the way around. As Doppel said, that's just how it works.

IIRC there is an option for no rotation in the properties. You could always just check that and manually update your sprite frames based on what keys you are pressing.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jan 30, 2008 12:16 pm

I don't see why it has to rotate the object or flip it at all, a movement where the sprite stays static in its rotation and just moves in the direction pressed, that would be an ideal proper movement.
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Post » Wed Jan 30, 2008 3:44 pm

You can have one object do the movement, then have another object on top always set to the position of the object with the movement.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,422

Post » Wed Jan 30, 2008 6:54 pm

[quote="Arima":7zviyorf]You can have one object do the movement, then have another object on top always set to the position of the object with the movement.[/quote:7zviyorf]

Heh i suppose that would do it, having the actual movement object just an invisible dot, set the sprite always on top, guess it could work.
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Post » Thu Jan 31, 2008 2:08 pm

Just a note if x is left and y is up, what are the other two?
B
3
S
2
G
5
Posts: 301
Reputation: 2,302

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests