This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-29 00:05:19

ahwize
New Scratcher
Registered: 2012-08-28
Posts: 1

greater than or less than inacurate?

i am building a game where i need to trigger an event when the game reaches a certain score i tried using the = to operator but the score was going past before is could trigger, i have set it up using a variable named score and expressed it as: score > 50 however im finding that is either triggers far too early or  there is a fair amount of lag for it to trigger.  anyone know anything about this??

Offline

 

#2 2012-08-29 00:28:04

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: greater than or less than inacurate?

You can use ...

<not<(a) < (b)>>
... to check if a ≥ b

Offline

 

#3 2012-08-29 00:29:33

Crystlemoon24
New Scratcher
Registered: 2012-05-24
Posts: 54

Re: greater than or less than inacurate?

Ya do that  smile

Offline

 

#4 2012-08-29 08:53:30

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: greater than or less than inacurate?

ahwize wrote:

im finding that is either triggers far too early

Like, at the very start? Try adding a WAIT 0 SECS at the beginning of the script that checks.

Offline

 

#5 2012-08-29 13:16:05

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: greater than or less than inacurate?

scimonster wrote:

ahwize wrote:

im finding that is either triggers far too early

Like, at the very start? Try adding a WAIT 0 SECS at the beginning of the script that checks.

Or just reset the variable in the script that runs the conditional, rather than elsewhere.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer