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

#1 2010-07-25 08:43:42

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

How can I make a time script?

I want my sprite to get hungrier every 30 seconds, but I don't want a reset timer block because it would interfere with the gameplat, any ideas? Can I have a picture, not forum blocks, ty!

Offline

 

#2 2010-07-25 08:54:33

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How can I make a time script?

Reset timer
Forever
If (timer) mod 30 = 0
  change (hunger) by 1


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2010-07-25 08:59:32

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

Re: How can I make a time script?

doesn't seem to work, is this right:

http://i28.tinypic.com/2elw2zn.gif

Offline

 

#4 2010-07-25 09:03:19

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How can I make a time script?

Yeah that's it, but I forgot the time is weird with it's, well, timing so put a round block around the timer.  If that doesn't do it, there are other things you can do.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#5 2010-07-25 09:13:09

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Re: How can I make a time script?

When GreenFlag clicked
Forever
Wait 30 secs
Change hunger by 1

Offline

 

#6 2010-07-25 14:39:48

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

Re: How can I make a time script?

or you could do that...

Offline

 

#7 2010-07-25 21:35:05

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How can I make a time script?

Scratch seems to have a hard time catching the timer at an exact point for some reason. Try this:

http://i31.tinypic.com/21c5emq.gif

Edit: Except change the mod 10 to mod 30. My bad.  hmm

Last edited by Harakou (2010-07-25 21:36:29)


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer