creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
ANIM help   
Geek2Nurse

Geek2Nurse
United States  

 visit Geek2Nurse's website: Adventures in Nornia
  5/18/2012

Okay, I'm not sure what I'm doing wrong here, 'cause this is my first animation. I'm hoping someone can enlighten me!

I have an agent with a total of 12 poses in the .c16 file; 4 frames each of 3 sizes. The first frame in each size, frames 0, 4, and 8, is a static pose, and the next 3 are made to be a looping animation in that size.

When the agent is dropped, I want to start the animation for the appropriate size -- so if it's small, the animation is frames 1-3; medium is 5-7, and large is 9-11.

If the agent is small when dropped, the animation works fine. But if it's medium or large, I get this sort of error:

Runtime error in agent 1 1 13416 script 1 1 13416 5 unique id 954839
Anim change failed - on part 0 which has base 0
... 5 1] elif pose le 7 {@}anim [5 6 7 255 5] else anim [ ...


It's not a problem with boundaries; I'm testing it in wide open spaces far from any walls or floors. My problem is the error message doesn't give me any hint as to WHY it's an error.

Here's my drop script:

scrp 1 1 13416 5
inst
* small size
doif pose le 3
anim [1 2 3 255 1]
* med size
elif pose le 7
anim [5 6 7 255 5]
* lg size
else
anim [9 10 11 255 9]
endi
slow
endm


The pickup script actually sets the pose to either 0, 4, or 8, but I set up the drop script doif to check for anything in the size range, just to be sure I was covered.

I'm not seeing the problem in the code. Is it obvious to anyone else?

UPDATE: Aha! I might have figured it out. I think I was misunderstanding the last number in the anim sequence...it's an INDEX, not a POSE. Whee, I'm off to do more testing!


---
Optimist: the glass is half full.
Pessimist: the glass is half empty.
Engineer: the glass is twice as big as it needs to be.

 


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