formula...

Get help using Construct 2

Post » Thu Jan 05, 2012 1:52 am

How do you write the formula to get an angle using a line from self.x, self.y TO sprite.x, sprite.y...

I thought I had it...   But no....

I want a sprite to rotate towards a variable (angle) which is calculated as above... Rotate towards angle or position wont work for the way I am doing the rotation...

Yann, this is probably up your ally...
Thanks in advance! Zetar2012-01-05 01:52:49
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Thu Jan 05, 2012 2:05 am

angle(self.x,self.y,sprite.x,sprite.y)
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Jan 05, 2012 2:12 am

Oh....   {slapping hand across forehead}....   Thanks QuaziGNRLnose...    
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Thu Jan 05, 2012 2:28 am

Lol! usually its helpful when your looking for something expression wise to click on the system object to see the available expressions, you might be surprised how obvious and easy they are to find.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Jan 05, 2012 3:01 am

As well as a quick look on the manual which is accessible from C2, clicking on the "Help" link in most windows.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, TheHat, tomi71 and 1 guest