creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
ccsf | links | advice | chat | polls | resources | post

Gnarler Water-Shyness   Development   Malkin | 5/26/2013  log in to like post  1

updated5/26/2013
Looking at the code that keeps the Gnarler out of the Ettin Desert pond.

The following code is in the Gnarler timer script, which helps keep the Gnarler out of the Ettin Desert's pond by using the water CA. It isn't held in a subroutine, meaning that it is always active, or potentially active, upon smelling water.

**keep away from bodies of water
*Do this if you're in a room.
doif room targ ne -1
*Do this if you smell any water at all.
doif prop room targ 5 ge 0.00001
*Look for the room next to this one that smells less like water.
setv va00 lorp room targ 5 0
*Go towards the centre of the room that smells less like water.
setv va01 torx va00
*If the less-smelly room is on your left and you were going right, turn around.
doif va01 lt 0 and ov10 gt 0
negv ov10
*or else, if the less-smelly room is on your right and you were going left, turn around.
elif va01 gt 0 and ov10 lt 0
negv ov10
*end the turning around doif
endi
*end the 'smelling water' doif
endi
*end the 'I'm in a room' doif
endi


AquaShee's Crabs use a reversed version of this to help them seek out water sources.

 
 
ylukyun | 5/26/2013  log in to like post

I wonder, is it feasible to apply this to a creature?


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