How do I do complex math formulas

Get help using Construct 2

Post » Mon Jan 02, 2017 10:23 am

Hi,

How do I do complex math formulas like the one here:

http://clickerheroes.wikia.com/wiki/Formulas

check the one with PRODUCT. I need to use for loop or there is another way.

Thanks
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
33
S
8
G
4
Posts: 155
Reputation: 3,752

Post » Mon Jan 02, 2017 2:55 pm

Yes, you need a loop.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Jan 02, 2017 5:34 pm

paala wrote:Hi,

How do I do complex math formulas like the one here:

http://clickerheroes.wikia.com/wiki/Formulas

check the one with PRODUCT. I need to use for loop or there is another way.

Thanks


From Level 1 to Level 140:
( 10* ( (Level- 1) + 1.55 ^ (Level-1) ) * (isBoss * 10) ) this should work.

From Level 141 to Level 500:
(10 * ( 139 + (1.55^139) ) * (1.145 ^ ( Level-140 ) ) * ( isBoss* 10) ) this should work also.

From Level 501 onwards:

i dont know what the II sign means... its product of the above and beneath number however dont know how is represented in C2. probably is ceil() system expression but im not sure.

edited : since the sign with double II is pi
(10*(139+(1.55^139))* (1.145^360)* (pi/(i=501^Level))*(1.14+0.005)*(pi/(i/500))* (isBoss * 10)) - im not sure this will work... but you can test it out.

edited again: (pi/(i/500)) i think should be calculated with atan(i/500)




In which II is the product symbol or pi in C2 and [] are ceiling brackets.



Edited 5 or so:

continuing with my stupidity probably


Hero Cost Formula (cost of upgrading from "Level")
The cost to level up Cid-Summer Cid, the Helpful Adventurer from level 1 to 15 is:
floor((5 + Level) * 1.07^Level - 1)
The cost to level up Cid-Summer Cid, the Helpful Adventurer from level 16 is:
floor(20 * 1.07^Level - 1)
The cost to level up other hero by one is:
floor(BaseCost * 1.07^Level - 1)
Last edited by gamecorpstudio on Mon Jan 02, 2017 6:32 pm, edited 6 times in total.
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,960

Post » Mon Jan 02, 2017 5:44 pm

There is no times() expression in C2.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Jan 02, 2017 5:47 pm

blackhornet wrote:There is no times() expression in C2.


i think there is ... ^ this is raising times (number after it)... you should check the power of 2 for audio i always use FFTsize 2^15 which is = to 32768 maximum fftsize allowed by c2 audio.


times expression in C2 is * <-- 10 times 2 = 20 if you do 10*2 youl get 20 in c2


here is a capxthat demonstrates that.
Last edited by gamecorpstudio on Mon Jan 02, 2017 5:56 pm, edited 1 time in total.
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,960

Post » Mon Jan 02, 2017 5:55 pm

The product symbol means a for-loop. You just changed your post to say you don't know what the Product symbol means - it means you have to do a loop, from the number on the bottom to the number on the top, because the index is used in the enclosed expression.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Mon Jan 02, 2017 5:58 pm

blackhornet wrote:The product symbol means a for-loop. You just changed your post to say you don't know what the Product symbol means - it means you have to do a loop, from the number on the bottom to the number on the top, because the index is used in the enclosed expression.


yea i did said that i dont know what the [] big sign means i just said that... never changed the meaning of that ... i changed the text where i was expressing myself to harsh maybe and making you think im telling u something that there isnt...

my point is in the capx above.. raising at ^ power is a expression in C2 the [] sign i dont know what it is probably is ceil but its probably not.

and times expression is there also which is * this means times something maybe we miss understood each other.


Edited: now i see what you where saying, the times() i used i missed on changing or remove it, its the * sign if you copy paste the formula from the page he gave, you get times() instead of * its just a typo lol.... miss understanding at its best. ha ha


edited2: here is the copy pasted data from the website shared originally directly from website using ctrl+c and ctrl+v to paste


\left \lceil 10\times(Level-1+1.55^{Level-1})\times [isBoss\times 10] \right \rceil <--- hence the times ... i forgot to remove... not a big deal.

edited that is pi lol the product symbol just googled it... my math skills are rusty. also its pi sigma to use it properly which i dont think C2 has.
B
77
S
23
G
69
Posts: 1,353
Reputation: 43,960

Post » Tue Jan 03, 2017 8:24 am

Ok, thanks, I guess a loop is the only way to do it
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
33
S
8
G
4
Posts: 155
Reputation: 3,752


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, ignaciosimo and 42 guests