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.

How can I make an upgrade that causes a button to produce a new resource?

ProtoX7ProtoX7 Member Posts: 2
Ok, so I have three major resources in my game, and I want to make an upgrade for the main clicking button that allows you to get the second resource, along with the first one. But I cannot figure out how to do it, so please help me.

Comments

  • TheBirdBlueTheBirdBlue Member Posts: 2
    You may be able to add "req" to the end of it that makes it require the upgrade.
  • BeeRexBeeRex Member Posts: 1
    You have to add a second onclick line that requires an upgrade to work. Here's an example:
    onclick: if (have buttonChocolate) yield 1 chocolate
    In this example, the player needs to buy the upgrade with the key buttonChocolate for the button to give 1 chocolate each click.
  • ProtoX7ProtoX7 Member Posts: 2
    BeeRex said:

    You have to add a second onclick line that requires an upgrade to work. Here's an example:
    onclick: if (have buttonChocolate) yield 1 chocolate
    In this example, the player needs to buy the upgrade with the key buttonChocolate for the button to give 1 chocolate each click.

    Thanks, this is exactly what I was looking for! :)
Sign In or Register to comment.