Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Please read the forum rules before posting.

Check if you are posting in the correct category.

The Off Topic section is not meant for discussing Cookie Clicker.
⚠️ The DashNet forums will be shut down on September 12th 2019.⚠️

Please see here for more information.

How player can gain X Buildings2 for every Y Buildings1 he already have?

dizzykeidizzykei Posts: 5Member
edited November 2017 in Developer's Lounge
Let's say i have cow as building 1 and house as building 2. I want that player earn 1 house for every 10 cows he buy. And it will be the only way to have houses. But he still can sold it. How to do it?


  • hoglahoohoglahoo Posts: 20Member ✭✭
    edited November 2017
    for building 1 you could do:
    on tick:building2 is 0.1*building1
    and then for building 2 make sure to use "no buy"
  • dizzykeidizzykei Posts: 5Member
    Thank you! It works, but in a strange way. I get first building 2 for 10 b1, next for 15, next for 25, next for 35.
  • hoglahoohoglahoo Posts: 20Member ✭✭
    Looks like it's rounding. Maybe try rounding down to the integer by using floor()

    on tick:building2 is floor(0.1*building1)

    This way if you have, say, 19 building1s, you'd have floor(0.1*19) -> floor(1.9) -> 1 and then at 20 it should go up to 2
Sign In or Register to comment.