Hi,
I did about the same with 2 holders but Yoshiki's solution is easier.

An other way, more general, is to put text parts as texts in an holder.
Then you just have to put in the displaying texts a script setting the this text to the text under the older's curser, then increasing the cursor by 1 to get the next text in the cursor for next display.

If you put text and holder on a playfield, just a copy of the playfield will give you a second pair of text and holder with the same scripts.

An other use of the holder is to shuffle it and getting the first element to get a text randomly.

Regards




-----Original Message-----
From: "Yoshiki Ohshima" [yoshiki@vpri.org]
Date: 11/17/2009 04:01 PM
To: "squeakland.org mailing list" <squeakland@squeakland.org>
Subject: Re: [squeakland] text conversation in etoys

Hi, Bill,

> I'm trying to setup a text based dialogue b/w 2 objects
>
> I dragged out two Text objects from Supplies, named them first and second
>
> The best I can do is write a series of scripts for the Text objects, one script for each part of the conversation
>
> Then I made a clock with a time variable and setting the ticker to one per second
>
> Then write a controller script, using world
> Test: clock's time > 2
>  Yes: first do script1
> Test: clock's time > 4
>  Yes: second do script1
> Test: clock's time > 6
>  Yes: first do script 2
>
> Also made a reset script, using world
>
> Is there a better way?

Another way is to put each part of conversation in a Holder (as
TextMorphs) and assign the phrase at the cursor to "first" and
"second". See

http://dev.laptop.org/~yoshiki/etoys/Conversation.002.pr

(and at the showcase once it appears)

In this way, you don't have to edit the script at all when you want to
modify the conversation.

-- Yoshiki
_______________________________________________
squeakland mailing list
squeakland@squeakland.org
http://lists.squeakland.org/mailman/listinfo/squeakland



   Free info on Le Cordon Bleu chef certification degree courses near you
Can you Cook as a Career?
CookingSchools.com/Le-Cordon-Bleu