# Trigger event after travelling 360 degrees

Get help using Construct 2

### » Fri Feb 07, 2014 3:43 am

This is somewhat hard to explain, but I'm trying to figure out how I can trigger an event after the player has traveled a full 360 degrees around a stationary object. Illustration below:

http://gyazo.com/9066f4d8442160063ce8a3efa591558c

Any ideas?jggiles2014-02-07 03:43:56
B
5
S
1
Posts: 11
Reputation: 397

### » Fri Feb 07, 2014 6:05 pm

create invisible spokes radiating out from your stationary object that can then be crossed and checked off a list/total count ?
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,912

### » Fri Feb 07, 2014 6:28 pm

Have the object, or a hidden one point to the player every tick then check the angle of the object.
B
53
S
16
G
9
Posts: 1,098
Reputation: 11,282

### » Fri Feb 07, 2014 8:00 pm

If you calculate the signed difference of the angle of the objects every tick and add that to a variable you can get the total degrees moved around the center object.

signed angle difference of b to a = angle(0,0,cos(b-a),sin(b-a))

Example showing the total degrees moved around the center object.
https://dl.dropboxusercontent.com/u/5426011/examples21/signed_anglediff_sum.capx
B
100
S
38
G
134
Posts: 5,554
Reputation: 85,321

### » Fri Feb 07, 2014 11:19 pm

@R0J0hound

Yeah i was gonna say that but i had something in my eye..
B
53
S
16
G
9
Posts: 1,098
Reputation: 11,282

### » Sat Feb 15, 2014 5:10 pm

-below-jggiles2014-02-15 17:14:43
B
5
S
1
Posts: 11
Reputation: 397

### » Sat Feb 15, 2014 5:14 pm

[QUOTE=R0J0hound] If you calculate the signed difference of the angle of the objects every tick and add that to a variable you can get the total degrees moved around the center object.

signed angle difference of b to a = angle(0,0,cos(b-a),sin(b-a))

Example showing the total degrees moved around the center object.
https://dl.dropboxusercontent.com/u/5426011/examples21/signed_anglediff_sum.capx[/QUOTE]

This worked perfectly! Thanks a million.
B
5
S
1
Posts: 11
Reputation: 397