timer issue

i have a timer that changes an attribute from true to false after 0.1 seconds its seems to work fine in the creator but not when I'm previewing on my phone. any ideas?

Comments

  • deej011deej011 Member Posts: 159

    Any ideas?

  • ArmellineArmelline Member, PRO Posts: 5,421

    Does it work when you check the "Run to completion" box?

  • deej011deej011 Member Posts: 159

    That doesn't make a difference for this instance is 0.1 of a second too quick? Is there a minimum that it needs to be for it to register

  • SocksSocks London, UK.Member Posts: 12,822

    Maybe dump the timer and use the clock, for example when self.time>0.1.

  • BalvamarBalvamar Member, PRO Posts: 117

    you could also use the math function MOD to alternate between true and false. google "Timers are for Chumps" GS optimisation tips. Great article, very useful :)

  • ArmellineArmelline Member, PRO Posts: 5,421

    If it's working fine in creator but not on device, it's possibly an issue of something overriding it. Do you have any other behaviours that turn it back from false to true?

  • deej011deej011 Member Posts: 159

    it only turns to true when u defeat an enemy than after 0.1 second it changes back to false. And than inside the enemy I have a rule saying when attribute is true change table value. In the creator it works fine but on my iPhone it doesn't work unless I have it set to after 1 second

  • ArmellineArmelline Member, PRO Posts: 5,421

    What is the condition that triggers the change to true? Could it still be true after 0.1s?

    It sounds like whatever condition is causing the timer to change to true is still running/valid when 0.1s has elapsed.

    We're really going to need to see your logic to offer much more help, though.

Sign In or Register to comment.