Limit angle height?

For questions about using Classic.

Post » Wed Jan 30, 2008 4:41 pm

Hi, I'm wanting my players arm to only go a certatin height before stopping.

http://detabeta.com/HL2DBeta.zip
B
4
S
2
G
4
Posts: 164
Reputation: 2,178

Post » Wed Jan 30, 2008 11:31 pm

At the risk of getting another "what does that mean?" response, I'm going to answer this...

You need to add a condition to your event that compares the current angle with the maximum angle. Like so:

[code:t8d29nh8]
+spriteArm.Angle Greater than -45 degrees
-Set spriteArm.Angle to (spriteArm.Angle-5)
[/code:t8d29nh8]

This is just an example, mind you. There are several ways you can do this.

Judging from your recent questions on the forum, you seem to be having trouble with basic things like comparing values and using multiple conditions in your events. Have you read the tutorial? It covers a lot of the basics as far as setting up events and performing actions. I suggest you start there. And don't just read it... do what it says. Make the tutorial game while you follow along. It's good experience.

http://scirra.com/files/ghostshootertut.zip
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jan 30, 2008 11:44 pm

Okay, I just ran through the tutorial again and oddly enough, there aren't any events with multiple conditions in them. Suffice it to say, you can have more than one condition to trigger an action, like so:

[code:6xq5101z]
+enemySprite is visible
+enemySprite overlaps bulletSprite
+enemySprite.Value('shield') = 0
-Destroy enemySprite
[/code:6xq5101z]

All you have to do is right-click an event condition and select "Insert New Condition," or click an existing condition and click the "+ New Condition" link that pops up.

Argh, sorry for the double-post.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests