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

#1 2011-06-24 11:42:41

LePenguino
Scratcher
Registered: 2010-12-10
Posts: 40

Help! Weird script glitching!

I want to have two songs play one after another as a soundtrack (When one finishes, the next starts) When the health is under 30, a new song should play (not in this script)

I don't know how these blocks work or how to post them, but my script is "When I recieve Menu, repeat until (health)<30, play sound ____ until done, play sound ____ until done.

This means that until your health is under 30, Song 1 will play until done, then Song 2 will start, and when it finishes, Song 1 will begin again.

Here is what happens:

Song 1 plays for about 6 seconds.  Then, it either restarts and plays from the beginning (Which sounds stupid), or continues straight into song 2! Help!

Offline

 

#2 2011-06-24 13:35:01

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Help! Weird script glitching!

Can you heal? Nevermind I got mixed up with what you said.

Last edited by ImagineIt (2011-06-24 13:39:29)

Offline

 

#3 2011-06-24 13:41:14

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

Re: Help! Weird script glitching!

Okay, so just for clarification, does you script look like this?:

Code:

When I receive Menu
Repeat until (health < 30)
    Play sound aeiou until done
EndRepeat
Play sound low_health until done

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

Offline

 

#4 2011-06-24 13:44:26

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Help! Weird script glitching!

http://i55.tinypic.com/2z516py.gif

Last edited by Kileymeister (2011-06-24 13:47:19)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#5 2011-06-25 08:49:58

LePenguino
Scratcher
Registered: 2010-12-10
Posts: 40

Re: Help! Weird script glitching!

Kiley Meister-

It looks exactly like the top one except instead of "health < 30 or health = 30, I just have "Health < 30.

Offline

 

#6 2011-06-25 09:26:20

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Help! Weird script glitching!

LePenguino wrote:

Kiley Meister-

It looks exactly like the top one except instead of "health < 30 or health = 30, I just have "Health < 30.

That’s you’re problem. LOL

> (greater than sign) is COMPLETELY different from < (less than sign).
Because Kileymeister had the greater than sign, and you wrote the less than sign.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

Board footer