|
Development Forum |
 |
|

HavenHerbaven
   
|
11/10/2013 | |
Hi there, I need some help I've been trying to get a code right but every time I test it doesn't or show up, if someone could take a look at my code I'd appreciate it.
Herb
|
 Peppery One
Papriko
    
|
11/10/2013 | |
It would be easier to have a look if you posted it 
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |

HavenHerbaven
   
|
11/10/2013 | |
Whoops!
"en-GB"
group AGNT "Bombay (C3)"
"Agent Type" 0
"Agent Description" "This sweet chocolaty cake is sure to bring a smile on any creatures face! "
"Agent Animation File" "bombay.c16"
"Agent Animation Gallery" "bombay"
"Agent Animation String" "0"
"Agent Bioenergy Value" 3
"Script Count" 1
"Script 1" @ "Bombay Script.cos"
"Dependency Count" 3
"Dependency 1" "bombay.c16"
"Dependency Category 1" 2
"Dependency 2" "chwp.wav"
"Dependency Category 2" 1
"Dependency 3" "bombay.catalogue"
"Dependency Category 3" 7
"Remove script" "enum 2 11 14862 kill targ next enum 2 11 4645 kill targ next scrx 2 11 14862 4 scrx 2 11 4645 12 scrx 2 11 14862 6"
group DSAG "Bombay (DS)"
"Agent Type" 0
"Agent Description" "This sweet chocolaty cake is sure to bring a smile on any creatures face! "
"Agent Animation File" "bombay.c16"
"Agent Animation Gallery" "bombay"
"Agent Animation String" "0"
"Agent Sprite First Image" 499
"Script Count" 1
"Script 1" @ "Bombay Script.cos"
"Dependency Count" 3
"Dependency 1" "bombay.c16"
"Dependency Category 1" 2
"Dependency 2" "chwp.wav"
"Dependency Category 2" 1
"Dependency 3" "bombay.catalogue"
"Dependency Category 3" 7
"Remove script" "enum 2 11 14862 kill targ next enum 2 11 4645 kill targ next scrx 2 11 14862 4 scrx 2 11 4645 12 scrx 2 11 14862 6 scrx 2 11 14862 4 scrx 2 11 4645 12 scrx 2 11 14862 6"
inline FILE "bombay.c16" "bombay.c16"
inline FILE "chwp.wav" "chwp.wav"
inline FILE "bombay.catalogue" "bombay.catalogue" |
Then there is also a different version
install script:
inst
new: simp 2 11 4645 "bombay" 1 22 500
attr 195
elas 10
accg 2
perm 100
seta va00 targ
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
*pick up script:
scrp 2 11 14862 4
**stimulus value for "picked up object":
stim writ from 18 1
**no 'doif' line, so doesn't need an 'endi'!
endm
*eat script:
scrp 2 11 4645 12
snde "chwp"
**stimulus value for "eaten food":
stim writ from 79 1
*reduce coldness, hunger and increase hotness and comfort:
driv 4 -0.5
driv 1 -0.5
driv 2 -0.5
driv 3 -0.5
driv 5 0.5
driv 14 0.5
chem 152 -0.5
chem 149 -0.5
chem 150 -0.5
chem 151 -0.5
chem 187 -0.5
chem 188 -0.5
chem 189 -0.5
chem 195 -0.5
chem 153 0.5
drop
endm
*simplified collision:
scrp 2 11 14862 6
lock
snde "chwp"
endm
*remove script:
rscr
enum 2 11 14862
kill targ
next
scrx 2 11 14862 12
scrx 2 11 14862 4
scrx 2 11 14862 5
scrx 2 11 14862 6 |
Herb
|
 Peppery One
Papriko
    
|
11/10/2013 | |
1. (code), not (CAOS)
2. "Agent Sprite First Image" 499, seriously? Your file got about 500 frames? Wow 
3. Why are your classifiers within Laura's range?
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Tea Queen
Laura
    

|
11/10/2013 | |
Did you copy and paste this code from the 'Hot Soup' file at all? I recognize the classifier it uses in there: 2 11 14862.  |

HavenHerbaven
   
|
11/10/2013 | |
I had no idea it was in Laura's range.
and I didn't copy your hot soup.
Edit: I think i'll try a C1 cob first than a C3/DS.
Herb
|
 Tea Queen
Laura
    

|
11/10/2013 | |
Here's what my Hot Soup .cos file looks like:
*install script:
inst
new: simp 2 11 14862 "hotsoup" 14 0 500
attr 195
bhvr 48
**heat CA:
emit 2 0.3
elas 10
accg 2
perm 100
**Make that froth swirl, baby!
anim [0 1 2 3 4 5 6 7 8 9 10 11 12 13 255]
*inject into inventory:
**storing the current agent in va00, essential for the injection into the inventory:
seta va00 targ
setv ov40 0
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
*pick up script:
scrp 2 11 14862 4
**stimulus value for "picked up object":
stim writ from 18 1
**no 'doif' line, so doesn't need an 'endi'!
endm
*eat script:
scrp 2 11 14862 12
snde "cofe"
**stimulus value for "eaten food":
stim writ from 79 1
*reduce coldness, hunger and increase hotness and comfort:
driv 4 -0.5
driv 1 -0.5
driv 2 -0.5
driv 3 -0.5
driv 5 0.5
driv 14 0.5
chem 152 -0.5
chem 149 -0.5
chem 150 -0.5
chem 151 -0.5
chem 187 -0.5
chem 188 -0.5
chem 189 -0.5
chem 195 -0.5
chem 153 0.5
drop
endm
*drop script:
scrp 2 11 14862 5
**stimulus value for "dropped object":
stim writ from 19 1
endm
*simplified collision:
scrp 2 11 14862 6
lock
sndc "cupd"
endm
*remove script:
rscr
enum 2 11 14862
kill targ
next
scrx 2 11 14862 12
scrx 2 11 14862 4
scrx 2 11 14862 5
scrx 2 11 14862 6 |
I really don't mind at all if editing my code is helping you understand CAOS better! You just might want to reserve your own range for your agents, so that you don't unwittingly overwrite the Hot Soup agent. Plus, it'd iron out a few difficulties with your code!
For instance, right now the classifier in your 'install' and 'eat' scripts (2 11 4645) doesn't match the classifier that the rest of your scripts use (2 11 14862).
I wish I could explain it better, so that it's easier to understand. I appreciate that I'm probably talking in another language right now! Hopefully someone else can. |

HavenHerbaven
   
|
11/10/2013 | |
I submitted a reserve thing, and that maybe the problem!
Herb
|
 Wee Scrivener
Trell
    

|
11/10/2013 | |
Definitely listen to Laura; she's one of the best coders out there.
Trell
"Holy crap in a casket!" |

HavenHerbaven
   
|
11/10/2013 | |
Yea, she's the awesome-est coder I know (and ghosthande) so much awesomeness.
Herb
|
 Tea Queen
Laura
    

|
11/10/2013 | |
Aw thanks, but I'm really not! I just code agents that I enjoy making. I can't sprite for toffee, and there are a lot of coders around that I aspire to be like and get so much inspiration from.  |