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?
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
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 [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
In reply to this post by Bill Kerr
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" [[hidden email]] Date: 11/17/2009 04:01 PM To: "squeakland.org mailing list" <[hidden email]> 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 [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland tmp1iLrzx.pr (125K) Download Attachment |
In reply to this post by Yoshiki Ohshima-2
On Wed, Nov 18, 2009 at 5:03 AM, Yoshiki Ohshima <[hidden email]> wrote:
Hi, Bill, thanks Yoshiki, that's easier to manage the problem is that I can't see any way to slow the time down below 1 tick per second
that's faster than a conversation ought to go!
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On Wed, Nov 18, 2009 at 1:08 PM, Bill Kerr <[hidden email]> wrote:
> On Wed, Nov 18, 2009 at 5:03 AM, Yoshiki Ohshima <[hidden email]> wrote: >> >> 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. > > > thanks Yoshiki, that's easier to manage > the problem is that I can't see any way to slow the time down below 1 tick > per second > that's faster than a conversation ought to go! then you could set "Number of ticks per second" to <1 , say 0.5. > >> >> -- Yoshiki > > > _______________________________________________ > squeakland mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/squeakland > > squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On Wed, Nov 18, 2009 at 2:47 PM, Korakurider <[hidden email]> wrote:
thanks! I did actually try that but only tried .1 and not 0.1 if i don't put the zero there then there is an error message
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
At Wed, 18 Nov 2009 15:42:52 +1030,
Bill Kerr wrote: > > Mouse down on Clock icon of scriptor and select "other" from "Ticks" menu, > then you could set "Number of ticks per second" to <1 , say 0.5. > > thanks! > I did actually try that but only tried .1 and not 0.1 > if i don't put the zero there then there is an error message That could be considered a bug. Alternatively, you can say: Holder's cursor increase by 0.1 There, you can type ".1" and it accepts it to mean "0.1". The tick rate is not modifiable from Etoys, but the argument for "increase by" is if you use a variable. In this way, you can have a slider for example to control the speed of conversation (or it can even go backwards). -- Yoshiki _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
Free forum by Nabble | Edit this page |