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
193
S
6
G
7
Posts: 213
Reputation: 10,203

Post » Thu Jan 05, 2012 2:05 am

angle(self.x,self.y,sprite.x,sprite.y)
B
73
S
13
G
8
Posts: 1,972
Reputation: 9,791

Post » Thu Jan 05, 2012 2:12 am

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

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
73
S
13
G
8
Posts: 1,972
Reputation: 9,791

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
276
S
103
G
84
Posts: 7,289
Reputation: 83,100


Return to How do I....?

Who is online

Users browsing this forum: mekonbekon, plinkie and 1 guest