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.

[SOLVED] [QUESTION] Variable/Changing frequency of a shinie

Alanor_Alanor_ Member Posts: 10
edited March 9 in Developer's Lounge
Is it possible to make a Shinie where the frequency is defined with a local variable?
I made this, but it doesn't seem to work:
Shinies *dealer|dealers on click:log woop on click:anim icon wobble on tick: $freq=30 if (coins:earned<=45) $freq=30 else $freq=60 end end movement:onLeft moveRight fade bounce:0.01 frequency:$freq frequency variation:10
The engine doesn't put out an ERROR message at the start of the game but the Shinie just never appears. Is there any solution for this?

EDIT: It does appear when I just sayfrequency:5 or frequency:60
Post edited by Alanor_ on

Comments

  • Alanor_Alanor_ Member Posts: 10
    edited February 12
    It does appear when I just sayfrequency:5orfrequency:60.
  • morkysherkmorkysherk Member Posts: 107 ✭✭
    edited February 13
    When the "on tick" effect block ends, the variable is reset. You'll have to make a resource which starts at 30 and changes to 60 when coins:earned<=45. It'd look like this:

    *freq
    start with:30
    on tick:if (coins:earned<=45) freq is 60
    always hidden
  • Alanor_Alanor_ Member Posts: 10

    When the "on tick" effect block ends, the variable is reset. You'll have to make a resource which starts at 30 and changes to 60 when coins:earned

    Do I then use the count of the ressource as frequency for the shinie or what?
Sign In or Register to comment.