Problems with angle/direction

For questions about using Classic.

Post » Sat Jun 20, 2009 4:58 am

I am super sorry if this covers any material in any of the tutorials, but my computer can't run them. I think it is because I do not have a graphics card, but I can't really afford one right now.

Okay, so I am very used to MMF 2's system, and because I have read so many good things about Construct I am trying to switch over. I don't want to use the default "behaviors" that it comes with, because I feel that they give me less control than I want, so I basically re-did one of the custom platform movements I had in MMF 2

My problem stems from the fact that Construct does not have directions- rather, it has angles. I like being able to manipulate the angle of my sprite without affecting the direction they are currently facing, so this is a problem. His default direction is right (angle 0), and the first thing I tried was manually flipping his animation frames in the animator for left (angle 180). I did not like how this affected his natural rotation, so I tried the mirror flip--- this also ruined the rotation, and since there are no events concerning this check box, I felt it took away some of the control I need.

So am I overlooking a feature, or is there a good way of doing what I want to do? The only idea I have would be to make each direction of an animation a separate animation, which could get confusing and cluttered. Perhaps I should request a feature for construct 2.0?

It may not seem like that big of a deal, but since I am not a very good game maker I do my best to make my games as graphically pleasing as possible. Thanks in advance dooooooods
B
3
S
1
G
3
Posts: 16
Reputation: 1,057

Post » Sat Jun 20, 2009 5:24 am

You can and probably should make a simple collision box[make it invisible], and apply your movement events to it, then center you character sprite on it .

This way you can rotate invisible collision box the way you want without affecting sprite direction.

Don't know about direction functions :| , myself new to construct. :mrgreen:
B
24
S
7
G
3
Posts: 138
Reputation: 2,795

Post » Sat Jun 20, 2009 5:30 am

I already have a seperate colision detector :T
My problem is with the displayed guy
B
3
S
1
G
3
Posts: 16
Reputation: 1,057

Post » Sat Jun 20, 2009 6:16 am

Yes, angles in Construct and directions in MMF are different.

Here's the basic breakdown:

If you make an animation angle for 180, then when your sprite is facing 180, it will use that animation angle instead of just turning the sprite. Construct chooses the animation angle closest to the actual angle of your sprite.

If you only have Angle 0 drawn, then Construct will manually rotate your sprite around 360 degrees.

If you have animations for 0, 90, 180, and 270 then Construct will pick the closest one and show that sprite, but it will manually turn it the rest of the way:

http://files.getdropbox.com/u/529356/angles.cap

If you set the sprite to "No rotation" in the properties, then it won't turn between angles, and the sprite will "snap" to whatever the closest angle is. Go ahead and try it out.

There are more animation and angle options too, mess with them a while and see what you can come up with. Construct might look a little like MMF on the surface, but it does work differently, so you're going to have to unlearn some old MMF habits if you want to switch over.


Anyway, you really should invest in a graphics card, it's pretty much necessary for making games with Construct. You're going to run out of onboard VRAM really quick, and the layout editor will crash on you, and you will have all sorts of problems. You won't be able to load and run other people's .caps and you'll be pretty much stuck for how much you can learn to do.

Not to mention you'll be asking a lot of questions that are easily answered in the tutorials, and people will just keep telling you to go look at the tutorials.

A cheap $40 graphics card from five years ago is enough to work on most stuff, and it's a good investment.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Jun 20, 2009 6:22 am

Yeah, I kinda figured that part out. I was just wondering if there was some easy way to have multiple directions that WEREN'T tied to the normal angle system.

I am planning on trying to get a laptop at the end of summer, since the school I'm going to won't have room for a desktop computer. I will pick out one that has a good graphics card for sure.
B
3
S
1
G
3
Posts: 16
Reputation: 1,057

Post » Sat Jun 20, 2009 6:31 am

Yes, you can do that with events. There's a "Set animation angle" action and you can use whatever conditions you like to trigger it.

You'll probably want to uncheck "Lock animation angles" in the sprite properties if you're going to do that, though.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Jun 20, 2009 6:43 am

I guess I'm not getting across what I want to do
I want to use the angles for smoothly rotating my sprites, but I want to have left and right directions for all of my sprites

I made a diagram as an example:
B
3
S
1
G
3
Posts: 16
Reputation: 1,057

Post » Sat Jun 20, 2009 7:09 am

Okay then. How does this not help you?

[quote="deadeye":mj2eebmi]Yes, you can do that with events. There's a "Set animation angle" action and you can use whatever conditions you like to trigger it.

You'll probably want to uncheck "Lock animation angles" in the sprite properties if you're going to do that, though.[/quote:mj2eebmi]

You make angle 0, you make angle 180. You uncheck "Lock animation angles" and manually set the animation angle when you need to. That way the animation won't change automatically from 0 to 180 when the sprite turns around... only when you tell it to. The leftward facing animation (180) will freely spin 360 degrees until you use an action to set the rightward facing animation (0), and vice-versa. And if that's not what you meant to do then yeah, I guess I'm not understanding.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Jun 20, 2009 7:15 am

That actually sounds like it'll probably do the trick. Sorry I wasn't understanding.



...I'm having a little trouble finding the lock animation angles checkbox, though.
B
3
S
1
G
3
Posts: 16
Reputation: 1,057

Post » Sat Jun 20, 2009 7:54 am

Sprite properties bar, at the very bottom :)


Edit:
Oops, looks like that's a v0.99.x option. If you're using v0.98.9 it's not there... sorry about that :P

Anyway, even though v0.99.3 is marked "unstable" it's still pretty stable so you may as well give it a shot.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests