creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
making objects buoyant in water   
xan

xan
United States  


  7/12/2015

I'm trying to code an object (C3/DS) that floats in water and am having a hard time. I could swear I've seen agents that are buoyant, or at least hydrophobic, but I'm searching and coming up with nothing. I also can't see any CAOS commands regarding it.

The best I've been able to come up with is a drop/collision system that tries to detect the room type and change accg appropriately, but it's ... not going well, and I feel like there should be a more intuitive way to do this. Am I wrong?

 
Laura
Tea Queen

Laura


 visit Laura's website: CC Chat
  7/12/2015

It's definitely possible to code buoyant objects. I think this past topic will be of some use to you! Kezune made a Floating Duck Toy for C3/DS. :)
 
xan

xan



  7/12/2015

definitely helpful. Thanks much!
 
Papriko
Peppery One

Papriko



  7/13/2015

As you can see in the topic Laura linked, there is sadly no easy and intuitive way of doing it. Your guess was pretty good already, you do need a timer script that keeps checking the room type and adjusts physics properties accordingly.

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  7/13/2015

^ Precisely.

You can check some of my agents if you'd like a reference... I've done it multiple times and more than one definition of the phrase. Some of the objects in KT will bob at the surface... and the Fun In The Sun fish "hover" when underwater and look like they're drifting around in the current, but don't necessarily float upwards.



 
xan

xan



  7/13/2015

I've got a nasty allergy to fast ticks, so I've been working on a system that falls 'asleep' once its velocity falls under a certain value... not sure yet how I'm going to prevent it drifting up out of the water, though, so it might get scrapped. It would be nice if we had a 'entered new room' callback...
 


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
Kodathekobold
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