|
Development Forum |
 |
|  Tea Queen
Laura
    

|
1/18/2016 | |
Please could someone give me some information on how make an agent use speech bubbles? Basically, I'd like to have the agent "say" a short phrase of my choosing when it's pushed.
Thanks!  |

Malkin
     Manager

|
1/18/2016 | 1 |
Have you ever played with the Gryphon Norn Dolly? It says things when creatures push it.
My TCR Norns |
 Peppery One
Papriko
    
|
1/18/2016 | 2 |
For text-only (i.e. no speaking sounds like norns do) you have to contact the speech bubble factory. That is an invisible agent that comes with C3/DS which handles all the speech bubble action going on in the world. You essentially just contact it with the text you want to be displayed and the agent the bubble should appear above.
The code works something like this:
* 1 2 10 is the classifier of the speech bubble factory
* Since there usually only is one, rtar should find it reliably
rtar 1 2 10
* Make sure the factory still exists and did not get autokilled. If it exists, proceed
* if not, this part will be skipped
doif targ <> null
* If we got this far, the factory exists. Send a message!
* targ is the factory, 126 the factory's "make a bubble" script
* The next part is the text that will be in the bubble
* ownr is who should have the bubble over their head, i.e. our agent
* The last number is the delay. We want no delay, so 0
mesg wrt+ targ 126 "Your Text goes here!" ownr 0
* Closing our doif...
endi
* The remaining script should be run by our agent again, not the factory
* So let's just return
targ ownr |
This is the snippet with every line explained as well as I could. The compact version you should use in your script looks like this:
rtar 1 2 10
doif targ <> null
mesg wrt+ targ 126 "Your Text goes here!" ownr 0
endi
targ ownr
|
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Tea Queen
Laura
    

|
1/18/2016 | |
Thanks, that's great.  |
|