Posted By
|
Message
|
kksonwhowho
Registered 05/07/2009
Points 719
|
12th July, 2009 at 04:15:07 -
Hi, I want to create a typewriter effect that plays a sound for each character shown, very similar to the mega man battle network message system. Im currently using this code in my string object.
Left$(string$( "temp dialogue" ), Len(string$( "dialogue" ))+1)
with a sound played and a new character shown every 00'-05. The only problem is that the sound plays even if a character is not being displayed. For example I might have this text "Hello, Welcome to the world!" During the huge space between 'hello' and 'welcome' the sound keeps playing every 00'-05 and I can't figure out why. Is there any way to fix this?
My mfa file - http://www.mediafire.com/download.php?rtmjejz442z
Edited by kksonwhowho
n/a
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
12th July, 2009 at 04:38:45 -
commas and spaces are characters, just like A, 8, or & are
you need something in your code to distinguish characters that should not play the sounds;
http://claniraq.googlepages.com/Typewriterwithsound_edited.mfa
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
kksonwhowho
Registered 05/07/2009
Points 719
|
12th July, 2009 at 04:56:18 -
Thanks, but how would I make it distinguish between new lines? for example.
"Hello
World."
I tried this and it played the sound during the space between hello and world.
n/a
|
[DELETED] Likes to put dots on paper
Registered 08/12/2008
Points 118
|
12th July, 2009 at 08:03:48 -
Isn't a linebreak a character you can tell it not to make a sound at?
n/a
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
12th July, 2009 at 11:25:43 -
a line break is a "NewLine$" character, which is really "\n"
just use " = NewLine$". This character is found under Special-->Strings-->New Line
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
kksonwhowho
Registered 05/07/2009
Points 719
|
12th July, 2009 at 21:45:13 -
Its still not working. Can anyone tell me whats wrong.
mfa file - http://www.mediafire.com/download.php?n0zeylmi1jy
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
12th July, 2009 at 21:54:31 -
if I'm not mistaken I believe newline$ is actually two characters, and therefore can't be extracted from a string for comparison.
I'll mess with your code and see if I can get it to work.
EDIT: I was correct, the Newline$ "character" is actually two characters. I suggest skipping them altogether by using a loop.
Edited by UrbanMonk
n/a
|
Pixelthief Dedicated klik scientist
Registered 02/01/2002
Points 3419
|
12th July, 2009 at 23:47:41 -
eh isn't newline just the "\n" characters?
as in you take the exact same code I used, and instead of splicing off the last character, you splice off the last two, and compare it to newline? And splice the 1st character off the end of a newline to compare to for the single byte of the "\" before it reaches the N?
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456
|
kksonwhowho
Registered 05/07/2009
Points 719
|
13th July, 2009 at 03:42:20 -
Thank you so much Pixelthief, it works perfectly now!
n/a
|
|
|