creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Speech Bubbles?   
Laura
Tea Queen

Laura
United Kingdom  

 visit Laura's website: CC Chat
  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

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  1/18/2016  1

Have you ever played with the Gryphon Norn Dolly? It says things when creatures push it.

My TCR Norns
 
Papriko
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...
 
Laura
Tea Queen

Laura


 visit Laura's website: CC Chat
  1/18/2016

Thanks, that's great. :)
 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
1 online
Twinkle
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki