creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
CAOS doesn't see my scripts   
Geek2Nurse

Geek2Nurse
United States  

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

I'm getting errors that look like this:

Runtime error in agent 2 4 13405 script 2 4 13405 9 unique id 1958888
Tried to set BHVR 48 when the agent doesn't have one of the appropriate scripts


The plant agent (2 4 13405) has bhvr=33, not 48. The seed it produces (in its timer script) has bhvr=48, and has both the required "pick up" and "eat" scripts to match the bhvr setting of 48:

*** pick up scripts
scrp 2 4 13405 4
stim writ from 97 1
endm

scrp 2 3 13405 4
endm

*** eat script
scrp 2 3 13405 12
snde "chwp"
stim writ from 79 1
stim writ from 77 1
kill owns
endm


is there something else that would make CAOS not think the scripts that are there?

UPDATE: Okay, I think it has something to do with where I have my targ owner command in the seed creation script...I have the targ command right after the new: simp that creates the seed, before setting its attr/bhvr/etc.--is that too soon? (I'm still really shaky on targs.)


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

 
RisenAngel
Sanely Insane

RisenAngel

Manager


 visit RisenAngel's website: The Realm
  5/3/2012

The "targ ownr" command shouldn't be placed until after the seed/what-have-you is completely injected (that is, after it's had its attributes set and has been moved to the owner's position.

For example, here's the seed creation bit from the Crinoids in Past Seas:
*Seeding
subr seed
*If you're a population monitor, ignore this check and just create the maximum amount of seeds
doif ov02 = 1
setv va01 rand 5 6
else
*Normal plants count the number of seeds first
*First, check the amount of surrounding seeds
setv va00 0
esee 2 3 18870
addv va00 1
next
*If a very low amount, create 5-6 seeds
doif va00 < 2
setv va01 rand 5 6
*If a moderate amount, create 3-4 seeds
elif va00 >= 2 and va00 < 4
setv va01 rand 3 4
*If a sizable amount, create 2-3 seeds
elif va00 >= 4 and va00 < 6
setv va01 rand 2 3
*If a rather large amount, create 1-2 seeds
elif va00 >= 6 and va00 < 8
setv va01 rand 1 2
*If too many seeds, screw it
elif va00 >= 8
setv va01 0
setv ov00 6
stop
endi
endi
*If va01 isn't 0, proceed with the seed creation bit
doif va01 <> 0
setv va02 posl
setv va03 post
subv va03 84
inst
reps va01
*Seeds! Yay!
new: simp 2 3 18870 "ps_crino" 4 0 rand 500 6000
attr 194
bhvr 48
accg 0
aero 10
perm 30
elas 0
fric 30
rnge 250
tick rand 10 50
setv ov00 0
setv ov01 0
anim [0 1 2 3 255]
emit 7 .5
puhl -1 43 116
doif tmvt va02 va03 = 1
mvto va02 va03
else
mvsf va02 va03
endi
velo rand -15 15 -5
repe
targ ownr
*Set flag to seeded if you are not a population monitor
doif ov02 = 0
setv ov00 6
endi
endi
retn


So yes, I'd say you're placing the "targ ownr" a bit too soon - the script is applying the attributes to the plant as opposed to the seeds, by the sounds of it.


~ The Realm ~
Risen Angel's Creatures Blog


 
Amaikokonut

Amaikokonut


 visit Amaikokonut's website: Naturing :: Nurturing
  5/3/2012

When you create an object with new: simp, the targ is automatically changed to the newly-created agent (the seed). If you targ ownr right after new: simp, it's going to targ the agent running the script (the plant), so yeah, anything you specify after that is going to apply to the plant as the targ and not the seed.

[Naturing :: Nurturing]
 
Geek2Nurse

Geek2Nurse


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

Okay...I was thinking I was creating the seed and then making it the targ, when actually I was creating the seed and then moving the targ back to the plant after the seed was placed.

Some day this will finally sink in!


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