|
Development Forum |
 |
|

Solariana
 
|
7/14/2013 | |
I made a new agent for C3, and just tested injecting it into a world. However, it won't inject! What could be the issue?
Drawing today! |

Solariana
 
|
7/14/2013 | |
Sure! 
Here's the COS file:
mvto 5440 3580
velo rand 30 40 -5
And here's the PRAY textfile:
"en-GB"
group AGNT "Ancient Dragon Skull"
"Agent Type" 0
"Dependency Count" 2
"Dependency 1" "Skull.c16"
"Dependency 2" "ccss.wav"
"Dependency Category" 2
"Dependency Category" 1
"Script Count" 1
"Script 1" @ "Dragonskull.cos"
"Agent Animation File" "Skull.c16"
"Agent Animation Gallery" "Skull"
"Agent Animation String" "0 1"
"Agent Bioenergy Value" 0
.... The image shows up on the creator machine, but upon pressing the inject button, nothing happens.
Drawing today! |
 Peppery One
Papriko
    
|
7/14/2013 | |
There are code tags you can use.
And is that really the whole cosfile? Don't you actually create the object anywhere with one of the NEW: commands?
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |

Malkin
     Manager

|
7/14/2013 | 1 |
You might like to review CAOS Chaos | First Simple Object: Cheese - you need to tell the game what it's moving to that location, and you need to create the item using the new:simp or new:comp command, so that it knows to use the skull image and what its classifier is.
My TCR Norns |
 Peppery One
Papriko
    
|
7/14/2013 | 1 |
That's the point. When that is really the whole cosfile, you basically just said "teleport to 5440 3580 and then make a jump to the right".
You never said what exactly shall teleport and jump, since you created no object.
Malkin made a good suggestion, try reading through the CAOS Chaos. I still sometimes recycle code from it, especially that go-to-inventory thing.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |

Solariana
 
|
7/15/2013 | |
Thank you so much, that makes sense! I'll go read that and tweak this a bit and see if it works!
Also, do you guys know of any species numbers which are as of yet unused?
Drawing today! |

Malkin
     Manager

|
7/15/2013 | 1 |
You can reserve some here. 
My TCR Norns |

Solariana
 
|
7/15/2013 | |
Thank you! TwT <3
Drawing today! |

Solariana
 
|
7/15/2013 | |
Okay so... I went back and edited the COS file using the CAOS Chaos link but it's still not injecting :/
Here's the file now:
inst
new: simp 2 24 x "Skull" 2 0 500
attr 195
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
rscr
enum 2 11 4645
kill targ
next
scrx 2 11 4645 12
Drawing today! |

Malkin
     Manager

|
7/15/2013 | |
What kind of object is the skull going to be? What will norns call it?
My TCR Norns |

Solariana
 
|
7/15/2013 | |
Well, it's going to ultimately be a vocabulary-teaching agent, but for now I'm just testing whether it can inject.
It will be a "tool."
Drawing today! |

Malkin
     Manager

|
7/15/2013 | 1 |
Try this - the classifier number needs to be fully filled out and consistent when you use it.
inst
new: simp 2 24 4645 "Skull" 2 0 500
attr 195
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next
rscr
enum 2 24 4645
kill targ
next
|
My TCR Norns |

Solariana
 
|
7/15/2013 | |
Thank you very much for writing that out for me Malkin, but for some reason it's still not injecting... 
I wonder what the issue is?
Hmmmm. Could it be a problem with the PRAY textfile?
Drawing today! |

Malkin
     Manager

|
7/15/2013 | |
You forgot the 'inline file' part - try modelling it off this one.
"en-GB"
group AGNT "Ancient Dragon Skull"
"Agent Type" 0
"Agent Animation File" "Skull.c16"
"Agent Animation Gallery" "Skull"
"Agent Animation String" "0 1"
"Remove script" "enum 2 24 4645 kill targ next"
"Script Count" 1
"Script 1" @ "Dragonskull.cos"
"Dependency Count" 2
"Dependency 1" "Skull.c16"
"Dependency Category 1" 2
"Dependency 2" "ccss.wav"
"Dependency Category 2" 1
inline FILE "Skull.c16" "Skull.c16"
inline FILE "ccss.wav" "ccss.wav"
|
My TCR Norns |
 Peppery One
Papriko
    
|
7/15/2013 | 1 |
inst
new: simp 2 24 4645 "Skull" 2 0 500
attr 195
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next |
Where gets va00 defined? It is supposed to hold the ID of the newly created agent.
Try this instead:
inst
new: simp 2 24 4645 "Skull" 2 0 500
attr 195
seta va00 targ
enum 1 2 11
spas targ va00
doif ov00 = 0 and clac = 0
mesg writ targ 0
endi
next |
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |

Solariana
 
|
7/15/2013 | |
Thanks guys. :3
I tried those files, and when I tried to compile the new agent in easyPRAY i got the error message:
"Ooh, something went wrong. The only valid symbol in this context is "@". Error on line 8."
What's that mean? :/
Drawing today! |

Malkin
     Manager

|
7/15/2013 | |
I don't think easyPRAY likes the pray file - have you tried reading A Beginners Guide to easyPRAY?
My TCR Norns |

Solariana
 
|
7/19/2013 | |
Hmm... :/
I read it through, but I'm still really lost on exactly what's wrong. Idk i think maybe I'll just give it a break for now. Thanks for your help, everyone. ^^
Drawing today! |

Arimar993

|
7/20/2013 | |
1. Please disable autokill so C3 will throw an error message when you try to inject your object. Use Ctrl+Shift+W then Ctrl+Shift+A then Ctrl+Shift+W. Then try to inject your object using the creator. If an error pops up, you may know more about what is going wrong and what you need to fix. Of course, you'll need to get easyPRAY to compile it first!
2. Sometimes it's best to start with a tiny script that already works and experiment with it before you jump in with making your own. The CAOS/COS scripts given to you above are working scripts, so you are likely doing something else wrong with easyPRAY. Please do not copy copyrighted code though -- Instead, use the Development Category of the Creatures Wiki. While it isn't complete documentation, there are lots of examples and some tutorials there. For more complete documentation, you can reference this page -- but you won't find examples there.
3. Are you trying to import your PRAY file into easyPRAY? You only need your COS file and any image/sound files your agent uses (and it is recommended to make them compile "inline" by using the checkmark). easyPRAY creates the PRAY file and then compiles it into the .agent file for you, and if you include your files inline, the .agent file will be the only file you need to move to your C3\My Agents folder. You do not need to know how to do PRAY when you are using easyPRAY.
4. Programming isn't easy. It takes a lot of patience and you'll spend a lot of time trying to figure out what you did incorrectly. It is quite normal to program (in any language) and have it not work the first (second, third, ...) time around. CAOS also has a pretty challenging learning curve -- it can be really confusing at first. Once you catch on, it gets much much easier and it is extremely rewarding. A vocabulary-teaching agent (assuming you plan to use the VOCB command) is not beyond the scope for a beginner, imo.
Read what you can find, follow instructions, get interactive with the tutorials, try experimenting, and if all else fails, don't be afraid to ask! With that, I wish you (and any other beginner) Good luck! |