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

Laura
United Kingdom  

 visit Laura's website: CC Chat
  8/16/2013

How would one code a plant so that its blooms open and close periodically, to mimic how real flowers behave?

Ghosthande, I'm in chat if you want a better idea of what I'm on about! I now have more sprites than the ones I've previously shown you (thanks, DarbyDoo! [heart]). :)

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/16/2013  1

You would want a timer script with a condition that checks what TIME is... TIME being a (pre-set) variable that keeps track of what time of day it is in your world. Its values are:

0 - dawn
1 - morning
2 - afternoon
3 - evening
4 - night

This is how I made the sunflower from the Dustdevil Grendel pack "follow the sun". The only thing to keep in mind is that you do need a second condition inside the first, to make sure the flower hasn't already animated for that time of day (or it will just open/close in a perpetual loop). You can do this by checking its POSE or setting a variable. :)



 
Laura
Tea Queen

Laura


 visit Laura's website: CC Chat
  8/16/2013  1

Thank you, Ghosthande! I think attempting this script is going to really test my current level of CAOS knowledge, but be absolutely awesome at the same time. Especially when it's implemented; I always want my agents to be as enjoyable as they possibly can be. :)
 
Laura
Tea Queen

Laura


 visit Laura's website: CC Chat
  8/19/2013

Another question:

*added 7 steps to the growth process so make number 37, instead of 30, so roses have more time before rotting:
elif ov00 gt 30

*if it's older then 20 ticks, let it rot. Fully rotten frame is 10:
doif pose eq 10
kill targ
endi

Is there anyway to speed the rotting process up a little? I can provide more code if necessary. :)

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/19/2013

Yes; just change "elif ov00 gt 30" to a higher number.


 


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
0 online
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