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

HavenHerbaven
Canada  


  4/20/2014

Hi, I've started a new project and I injected my agent into my game and I got a dependency error. What's wrong with it?
inst
new: simp 2 23 14883 "Lollipops" 1 12 3000

bhvr 11
attr 198
perm 60
elas 15
fric 50
accg 7
aero 5

doif tmvt 6112 9155 = 1
mvto 6112 9155
elif tmvt 6112 9155 ne 1
mvsf 6112 9155
else
mvsf rand 748 1550 9547
endi
tick 16
endm

**Vendor Push
scrp 2 23 14883 1
stim writ from 90 1
rnge 300
setv va66 0
esee 2 11 14883
addv va66 1
next
doif va66 le 4
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now we are making the food.
inst
setv va60 rand 0 11
mulv va60 11
new: simp 2 11 14883 "Lollipops" 3 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
velo rand -10 10 rand -15 -20
tick 8
emit 8 0.35
endi
endm

*Vendor Pull
scrp 2 23 14883 2
stim writ from 90 1
rnge 300
setv va66 0
esee 2 11 14883
addv va66 1
next
doif va66 le 4
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now we are making the food.
inst
setv va60 rand 0 11
mulv va60 11
new: simp 2 11 14883 "Lollipops" 11 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
velo rand -10 10 rand -15 -20
tick 8
emit 8 0.35
endi
endm

**Vendor Hit Script
scrp 2 23 14883 3
sndc "hit_"
velo 0 rand -20 -30
stim writ from 92 1
endm



**Vendor Timer Script
scrp 2 23 14882 9
*check if you're being carried
doif carr = null
lock
*set a field of view
rnge 300
*see how many lollipops you can see
esee 2 11 14883
addv va00 1
next
*if it's less than 4
doif va00 le 4
*set the position to vend
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now let's vend some food
inst
*randomise the food from 11 choices (each with 4 pictures)
setv va60 rand 0 11
mulv va60 11
*make the food
new: simp 2 11 14883 "Lollipops" 3 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
*move it safely
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
*give it some velocity
velo rand -10 10 rand -15 -20
*start the food timer
tick 8
*make it smell
emit 8 0.35
*close the 'less than 4 doif'
endi
*close the 'if I'm not being carried doif'
endi
*end the script
endm


*****Food eat script
scrp 2 11 14883 12
lock
sndc "c1h1"
stim writ from 79 1
doif from ne null
targ from
*chemicals can't be less than -1.0 or greater than 1.0
chem 162 -1.0
chem 155 -1.0
endi
*if you're a full lolly
doif pose = 0
*become a medium lolly
pose 1
*if you're already a medium lolly
elif pose = 1
*become a small lolly
pose 2
*if you're a small lolly
elif pose = 2
*become a tiny lolly
pose 3
*if you're a tiny lolly
elif pose = 3
*vanish
wait 20
kill ownr
*end the lolly-size doif
endi
*end the eat script
endm

**pickup event
scrp 2 11 14883 4
stim writ from 18 1
pose [standing up pose #]
endm


**drop event
scrp 2 11 14883 5
stim writ from 19 1
pose [laying down pose #]
endm

**Lollipop Collision Script
scrp 2 11 14883 6
doif wall = down
snde "dr64"
endi
endm

**Remove script
rscr
enum 2 23 14883
kill targ
next
enum 2 11 14883
kill targ
next
scrx 2 23 14883 1
scrx 2 23 14883 2
scrx 2 23 14883 3
scrx 2 23 14883 9
scrx 2 11 14883 9
scrx 2 11 14883 12
scrx 2 11 14883 4
scrx 2 11 14883 5
scrx 2 11 14883 6



and the pray:
group AGNT "Lollipops (C3)"
"Agent Type" 0
"Agent Animation File" "lollipops.c16"
"Agent Animation Gallery" "lollipops"
"Agent Animation String" "0"
"Remove script" "enum 2 23 14883 kill targ next enum 2 11 14883 kill targ next scrx 2 23 14883 1 scrx 2 23 14883 2 scrx 2 23 14883 3 scrx 2 23 14883 9 scrx 2 11 14883 9 scrx 2 11 14883 12 scrx 2 11 14883 6"
"Script Count" 1
"Script 1" @ "Lollipop vender.cos"
"Dependency Count" 5
"Dependency 1" "lollipops.c16"
"Dependency Category 1" 2
"Dependency 2" "hony"
"Dependency Category 2" 1
"Dependency 3" "hit_.wav"
"Dependency Category 3" 1
"Dependency 4" "dr10.wav"
"Dependency Category 4" 1
"Dependency 5" "Lollipops.catalogue"
"Dependency Category 5" 7

group DSAG "Lollipops (DS)"
"Agent Type" 0
"Agent Description" "A Vendor to make some sweet lollipops for your creatures to enjoy."
"Web Label" "Creatures Caves"
"Web URL" "www.creaturescaves.com"
"Agent Animation File" "lollipops.c16"
"Agent Animation Gallery" "Lollipops"
"Agent Animation String" "0"
"Agent Sprite First Image" 0
"Remove script" "enum 2 23 14883 kill targ next enum 2 11 14883 kill targ next scrx 2 23 14883 1 scrx 2 23 14883 2 scrx 2 23 14883 3 scrx 2 23 14883 9 scrx 2 11 14883 9 scrx 2 11 14883 12 scrx 2 11 14883 6"
"Script Count" 1
"Script 1" @ "Lollipop vender.cos"
"Dependency Count" 5
"Dependency 1" "lollipops.c16"
"Dependency Category 1" 2
"Dependency 2" "hony"
"Dependency Category 2" 1
"Dependency 3" "hit_.wav"
"Dependency Category 3" 1
"Dependency 4" "dr10.wav"
"Dependency Category 4" 1
"Dependency 5" "Lollipops.catalogue"
"Dependency Category 5" 7

inline FILE "lollipops.c16" "lollipops.c16"
inline FILE "Lollipops.catalogue" "Lollipops.catalogue"


Herb


 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  4/20/2014

Well, I see a catalogue line for something called "hony"... but it doesn't have a file extension like the other sound effects listed, or an "inline FILE" line... that might be causing it. :)


 
evolnemesis
Code Monkey

evolnemesis



  4/20/2014

What is 'hony'? I don't see that file anywhere, and it has no extension. That could be part of your problem.

Also, a 'c1h1' sound is played, but I don't see a dependency listed for it, and the file's not included with the agent, but I don't see it in c3 or ds sounds anywhere (could you mean 'Cah1.wav'?) Also, 'dr64' is played too, that's in my sounds, but I don't see it listed as a dependency, even though it is played in the script.


"For small creatures such as we, the vastness is bearable only through love."
"We are a way for the cosmos to know itself." - Carl Sagan

 
HavenHerbaven

HavenHerbaven



  4/20/2014

I've fixed the Dependency, but know its says Script 12 11 1483 4
excpeted numeric rvalue at token "
... writ from 18 1 pose
@ [standing up pose #50]]

inst
new: simp 2 23 14883 "Lollipops" 1 12 3000

bhvr 11
attr 198
perm 60
elas 15
fric 50
accg 7
aero 5

doif tmvt 6112 9155 = 1
mvto 6112 9155
elif tmvt 6112 9155 ne 1
mvsf 6112 9155
else
mvsf rand 748 1550 9547
endi
tick 16
endm

**Vendor Push
scrp 2 23 14883 1
stim writ from 90 1
rnge 300
setv va66 0
esee 2 11 14883
addv va66 1
next
doif va66 le 4
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now we are making the food.
inst
setv va60 rand 0 11
mulv va60 11
new: simp 2 11 14883 "Lollipops" 3 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
velo rand -10 10 rand -15 -20
tick 8
emit 8 0.35
endi
endm

*Vendor Pull
scrp 2 23 14883 2
stim writ from 90 1
rnge 300
setv va66 0
esee 2 11 14883
addv va66 1
next
doif va66 le 4
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now we are making the food.
inst
setv va60 rand 0 11
mulv va60 11
new: simp 2 11 14883 "Lollipops" 11 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
velo rand -10 10 rand -15 -20
tick 8
emit 8 0.35
endi
endm

**Vendor Hit Script
scrp 2 23 14883 3
sndc "hit_"
velo 0 rand -20 -30
stim writ from 92 1
endm



**Vendor Timer Script
scrp 2 23 14882 9
*check if you're being carried
doif carr = null
lock
*set a field of view
rnge 300
*see how many lollipops you can see
esee 2 11 14883
addv va00 1
next
*if it's less than 4
doif va00 le 4
*set the position to vend
setv va00 posl
addv va00 30
setv va01 post
addv va01 10
*now let's vend some food
inst
*randomise the food from 11 choices (each with 4 pictures)
setv va60 rand 0 11
mulv va60 11
*make the food
new: simp 2 11 14883 "Lollipops" 3 va60 4900
attr 195
bhvr 48
elas 30
fric 50
accg 3
*move it safely
doif tmvt va00 va01 = 1
mvto va00 va01
else
mvsf va00 va01
endi
*give it some velocity
velo rand -10 10 rand -15 -20
*start the food timer
tick 8
*make it smell
emit 8 0.35
*close the 'less than 4 doif'
endi
*close the 'if I'm not being carried doif'
endi
*end the script
endm


*****Food eat script
scrp 2 11 14883 12
lock
sndc "hony.wav"
stim writ from 79 1
doif from ne null
targ from
*chemicals can't be less than -1.0 or greater than 1.0
chem 162 -1.0
chem 155 -1.0
endi
*if you're a full lolly
doif pose = 0
*become a medium lolly
pose 1
*if you're already a medium lolly
elif pose = 1
*become a small lolly
pose 2
*if you're a small lolly
elif pose = 2
*become a tiny lolly
pose 3
*if you're a tiny lolly
elif pose = 3
*vanish
wait 20
kill ownr
*end the lolly-size doif
endi
*end the eat script
endm

**pickup event
scrp 2 11 14883 4
stim writ from 18 1
pose [standing up pose #50]
endm


**drop event
scrp 2 11 14883 5
stim writ from 19 1
pose [laying down pose #48]
endm

**Lollipop Collision Script
scrp 2 11 14883 6
doif wall = down
snde "dr64"
endi
endm

**Remove script
rscr
enum 2 23 14883
kill targ
next
enum 2 11 14883
kill targ
next
scrx 2 23 14883 1
scrx 2 23 14883 2
scrx 2 23 14883 3
scrx 2 23 14883 9
scrx 2 11 14883 9
scrx 2 11 14883 12
scrx 2 11 14883 4
scrx 2 11 14883 5
scrx 2 11 14883 6


Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/20/2014  1

To set a pose, you need to just write

pose 50


which will make it take frame #50 from your sprite file to look like. You don't need the square brackets.

How you could write it is


**pickup event
scrp 2 11 14883 4
stim writ from 18 1
*standing up pose #50
pose 50
endm


My TCR Norns
 
HavenHerbaven

HavenHerbaven



  4/20/2014

Okay now its a chocolate lolli vending ther lollipops like the licked ones. I:

Herb


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  4/20/2014

For this, you might have to have a think about how you've set up your sprite file. It could be that rather than having all your lollies upright like soldiers, and then having all your lollies lying down, that you might need to have all of one flavour together, and then work from there.

My TCR Norns
 


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