How do I check for the range of angle of motion?

Get help using Construct 2

Post » Sat Mar 08, 2014 11:11 pm

How would I check if the Player is moving at a range of motion like between 315-45 degrees?
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Sat Mar 08, 2014 11:28 pm

The is an event called "Is between angels" which compares if the object is between two angles.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Mar 10, 2014 6:46 am

cvp wrote:The is an event called "Is between angels" which compares if the object is between two angles.


Thanks cvp, but I'm not sure how to get that to work with the bullet behavior. The helicopter still only tilts in one direction.

I've attached a link to the C2 project with just the helicopter. I'm a bit desperate because the game is suppose to be a gift for my nephew and I've been trying to get the tilt to work for weeks. I'm going to give it to him either way, but it would be nice if I can get the helicopter to behave a little closer to a real one. He loves helicopters!

If anyone can fix the tilt for me to work with the bullet behavior controls, I'll return the favor by doing some artwork for them. Maybe a logo or something? I'm not the best artist, but some people like my stuff. Offer only good until 12th because his birthday is on the 13th.

Rescue Copter
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Mon Mar 10, 2014 11:07 am

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Mon Mar 10, 2014 4:03 pm

@RamPackWobble

Awesome! That's pretty cool how you achieved it. You have me thinking of events in a different way. Thanks!

My nephew is going to flip when he sees this. PM me with whatever you want in return. I'll get started on it tonight. I can draw a little better than what I let on in the example. It only took me 8-10 minutes to make those sprites.

Thanks again!
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Mon Mar 10, 2014 4:20 pm

I had another look at your code and there is a much easier way - updated the capx - same download link as above. You already had an x offset amount for your joystick so I have just taken that that offset to set the angle.

Just in case you were very quick I messed up the save location (saved to desktop not dropbox !) - if you got the same file as before then please try again.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Mon Mar 10, 2014 4:58 pm

@RamPackWobble

Wonderful! The rotation is a lot smoother now. Thanks for that.

I want to return the favor for helping me out of a bind, so please contact me within the next few days about what you want done. I can design a studio logo or redesign an existing game logo, an illustration or some game art. I'll create something nice for you.
B
14
S
3
G
1
Posts: 87
Reputation: 1,108

Post » Wed May 18, 2016 12:55 pm

Hi All,
@RamPackWobble

I see that here you achieve exactly what i'm looking for, a way to make a helicopter to tilt in the direction of movement, but the link to the dropbox is down, anyone here that can refresh the link? pleaaase, I'm really going crazy here :D

Thanks in advance!
B
28
S
6
G
4
Posts: 51
Reputation: 3,922

Post » Wed May 18, 2016 5:08 pm

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Fri May 20, 2016 1:14 pm

@RamPackWobble

You are awesome! Thank you! Really!
B
28
S
6
G
4
Posts: 51
Reputation: 3,922

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests