What does this mean in English?

Get help using Construct 2

Post » Fri Nov 18, 2011 7:53 pm

280 + sin(time * (360 / 5)) * 150

What does it actually mean? Please break it down.

- Thanks
B
13
S
2
G
4
Posts: 54
Reputation: 3,882

Post » Fri Nov 18, 2011 8:06 pm

B
61
S
22
G
14
Posts: 1,480
Reputation: 16,373

Post » Fri Nov 18, 2011 8:21 pm

two hundred and eighty, plus one hundred and fifty times the sine of: three hundred and sixty divided by 5, times the variable called time. You should become very familiar with expressions if you want to be able to make anything in Construct. sin() is a math function, which you should be familiar with.Davioware2011-11-18 20:34:03
B
25
S
3
G
6
Posts: 1,198
Reputation: 5,622

Post » Fri Nov 18, 2011 8:35 pm

I think in order it would be the sine of 360 divided by 5 times "time" times 150 +280

Dunno why you need 360/5 tho....
Image Image
B
163
S
48
G
101
Posts: 7,462
Reputation: 72,546

Post » Fri Nov 18, 2011 8:45 pm

the 360/5 doesn't matter AFAIK, constant expressions like that are compiled into a constant at runtime.
B
25
S
3
G
6
Posts: 1,198
Reputation: 5,622

Post » Fri Nov 18, 2011 9:04 pm

Yeah, it would make more sense if the 5 were a variable, like loopindex.
Image Image
B
163
S
48
G
101
Posts: 7,462
Reputation: 72,546


Return to How do I....?

Who is online

Users browsing this forum: AnotherUser, Cosmyndevil, RobertMKD, Rudi55, Thndr, Yahoo [Bot] and 14 guests