Isometric sprite facing changing

For questions about using Classic.

Post » Tue Jan 29, 2008 5:30 pm

I have a question that I can't figure out. Is there a clean way of making the sprite's facing change when it moves in a certain direction? I have all the keyframes of the sprite made for eight directional movement, I just can't figure out how to make it so when you click right of the sprite, it switches to the sprite for that facing.

When I start a new event, I get an option for comparing values. That option isn't available in the System selection stuff after you already do the mouse click check. If I make a new event, and do all my angle checking there, won't the angle change be based on the mouse direction all the time? Also, how do you AND two Compare Values together?

One thing that would be handy is if Compare Values had a "between" pull down option.

Anyway, anyone know of a good way to do this?
B
1
G
4
Posts: 5
Reputation: 1,035

Post » Tue Jan 29, 2008 8:59 pm

[quote:3jdmigfo]I just can't figure out how to make it so when you click right of the sprite, it switches to the sprite for that facing[/quote:3jdmigfo]
How about if you make the sprite look at the mouse when you click? Use the Set Angle toward Position action.

[quote:3jdmigfo]how do you AND two Compare Values together?[/quote:3jdmigfo]
Every condition in an event must be met for the event to run, i.e. there's an implicit AND for all conditions. So you can just do:
Value greater than 5
Value less than 10
with ordinary Compare Values in the same condition, and it will test if the value is between 5 and 10 (not inclusive). It would make a useful condition though - value is between... I'll add it to the todo list.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Jan 30, 2008 4:32 am

[quote="Ashley":2o8dbicb]How about if you make the sprite look at the mouse when you click? Use the Set Angle toward Position action.[/quote:2o8dbicb]

Isometric(or 3/4 view) is what games like Jagged Alliance 2, Baldur's Gate, Commandos, Arcanum, Diablo, etc. use. It's a way of adding a bit of depth to 2D. As such, sprites are typically done in eight facings(or five and mirroring three but that results in other problems). Just angling the sprite would make it look like the player is falling over. :)
B
1
G
4
Posts: 5
Reputation: 1,035

Post » Wed Jan 30, 2008 6:38 am

[quote="anotherthing":2eoxf70q]
Isometric(or 3/4 view) is what games like Jagged Alliance 2, Baldur's Gate, Commandos, Arcanum, Diablo, etc. use. It's a way of adding a bit of depth to 2D. As such, sprites are typically done in eight facings(or five and mirroring three but that results in other problems). Just angling the sprite would make it look like the player is falling over. :)[/quote:2eoxf70q]

Create each angle you need, then use the suggested command.

Obviously you don't want to rotate the sprite, just set it to the angles you make before hand.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Wed Jan 30, 2008 5:15 pm

Oh, I'm an idiot. You guys are talking about the angle thing in the animation panel of the interface, right?
B
1
G
4
Posts: 5
Reputation: 1,035

Post » Wed Jan 30, 2008 7:50 pm

Yes. :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Aug 07, 2011 12:11 am

can you upload the .cap file please!!!
B
9
S
2
G
4
Posts: 3
Reputation: 2,895


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests