Pages: 1
Topic closed
Ok, I'm making a dating sim seeing as there's a lack of them on scratch. I need one of the girls to tell you something about herself when you click the "Ask" button. And i need it randomized rather than her tellng you things in a specific order
Last edited by flipysrevenge96 (2010-06-13 14:59:11)
Offline
Um, I will help as long as this will be appropriate for kids of all ages.
You make a list of the sayings, and put a (item (any) of list) inside a say block.
It will pick a random saying everytime. But, you might want to put a delete item from list block in there somewhere.
Offline
Ah - you can do this by making a list (go to the "variables" pallet, and click "make a list") Type in a different quote to each box on the list, then put something like this:
[when ask button clicked]
[say (item (pick random (1) to (length of [list v]) of [list v] ]
You find the blocks with "[list v]" on them in Variables, and "pick random" in Operators. You could also use "ask" instead of "say" Hope this helps!
Offline
Wolfie1996 wrote:
Ah - you can do this by making a list (go to the "variables" pallet, and click "make a list") Type in a different quote to each box on the list, then put something like this:
[when ask button clicked]
[say (item (pick random (1) to (length of [list v]) of [list v] ]
You find the blocks with "[list v]" on them in Variables, and "pick random" in Operators. You could also use "ask" instead of "say"Hope this helps!
Oh, you were so close wolfie! But I beat ya You can do either of our suggestions.
Both will work
Last edited by samurai768 (2010-06-13 15:06:57)
Offline
Hey guys thanks for the help...and don't worry. this will be appropriate. The only questionable thing is kissing and I'm just drawing a smiley face for that one . I see the need for you to wonder if my project will be appropriate with all the...erm...."content" in most dating sims (Cough*Newgrounds*Chough) Don't worry. I should be done with it in about 2 more days
Last edited by flipysrevenge96 (2010-06-13 19:25:17)
Offline
flipysrevenge96 wrote:
Hey guys thanks for the help... Except, is there a way of doing this without a "list?"and don't worry. this will be appropriate. The only questionable thing is kissing and I'm just drawing a smiley face for that one
.
Sure, you could do it with out a list...but a list is much easier. Here is a way to do it without a list:
[blocks]
<when[ Sprite ]clicked>
<set{ Answer_Number }to( <pick random( 1 )to( 6
<if> <( <{ Answer_Number }><=> 1 )>
<say[ first answer ]for( 2 )secs>
<end>
<if> <( <{ Answer_Number }><=> 2 )>
<say[ second answer ]for( 2 )secs>
<end>
<if> <( <{ Answer_Number }><=> 3 )>
<say[ third answer ]for( 2 )secs>
<end>
<if> <( <{ Answer_Number }><=> 4 )>
<say[ first answer ]for( 2 )secs>
<end>
<if> <( <{ Answer_Number }><=> 5 )>
<say[ second answer ]for( 2 )secs>
<end>
<if> <( <{ Answer_Number }><=> 6 )>
<say[ third answer ]for( 2 )secs>
<end>
... and so on up to the total number of answers you want.
Here's how you do it with lists:
<when[ Sprite ]clicked>
<say[ item (any) of Answer_List ]for( 2 )secs>
[/blocks]
Offline
You have first dibs on my next question okay fg123? ;D
Offline
Topic closed
Pages: 1