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.

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

Alanor_Alanor_ Posts: 10Member
edited March 2018 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</code>
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_ Posts: 10Member
    edited February 2018
    It does appear when I just sayfrequency:5orfrequency:60.
  • morkysherkmorkysherk Posts: 133Member ✭✭✭
    edited February 2018
    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_ Posts: 10Member

    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.