creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Help Me Get Better At CAOS   
Steelfoot

Steelfoot



  11/1/2009

So I'm actually trying to learn how to develop better! Up to this point, my objects have been relatively simple--a giant Erlenmeyer flask that spits out calm balm and a pair of paste-on googly eyes, which may or may not be approved by the site staff soon. As I'm not content with just producing random junk that really is nothing new or interesting (save the googly eyes--pretty sure those have never been done before!), I'm always full of ambitious new ideas for agents. Unfortunately, I'm also dumb as a box of hammers and need someone (or many someones) to hold my hand. If nothing else, this thread may end up becoming a sort of FAQ thread--and I'm perfectly okay with others asking their own questions in this thread as well.

To start off:

-How would I script so that an object knows that it has made contact with the ground, and act accordingly?
-Can I flip a sprite horizontally or vertically without having to create an entire new sprite? Not that it's difficult to just make a new sprite, but it would be much more convenient to use CAOS for such a thing.
-Is there a way to make an agent react to an object on the ground? Say, a walking garbage disposal that destroys detritus objects that it encounters?
-How would I go about putting a timer on the life of an object, i.e. after a given time period the object deletes itself, but continues to run scripts while its "life" carries on?
-Where is Waldo?

Thanks in advance for helping me out, sorry if I'm missing something severely obvious like a plainly visible tutorial on how to do all these things.

On a different note, is anyone else having trouble with the Creatures Wiki?

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/1/2009

1. The easiest way is to use a collision script (script number 6, or scrp X X X 6), which is automatically run (assuming it exists) whenever the object collides with something with any amount of force. This does mean it will also be activated when the object hits a wall/ceiling as well as the floor, but it is still the simplest way to do it. If you just want to make sure it isn't falling at the moment, use "doif fall eq 0", which checks that the object isn't falling.

2. There ARE commands which seem to make it possible to create flipped sprites in-game, but I'm not sure if these commands are actually implemented in the game. None of the official agents seem to use them, so I'm tempted to think there's something wrong with them--creating the flipped sprites takes too much time/memory/slows the game, it is unfinished or never included in the engine, etc. Really, though, I think making the sprites for both directions would be much more straightforward to code.

3. You can use the etch command to check whatever objects the agent is touching. It works like just like the enum command--you "etch X X X" [family, genus, species] and it will enumerate through any matching object that the agent is touching.

4. Why, that's what timer scripts are for, of course. :) Typically you just set a variable when you create the object that will be its life span, and whenever the object reaches the end of the script (after finishing any actions, or after waiting a certain amount of time) it subtracts one from that number. Then add a condition that says if the number has reached zero, it deletes itself. Timer scripts loop automatically (assuming you add a line when you create the object that says "tick 1";), so it will act as a built-in countdown.

5. Hiding.


If you haven't already I really suggest you grab the CAOS documentation that comes with DS. Even though it probably won't make much sense at first, it's a treasure trove of interesting commands.



 
Laura
Tea Queen

Laura

Administrator


 visit Laura's website: CC Chat
  11/2/2009

Sorry, I have no help to offer - being sadly CAOS illiterate - just wanted to say that I love those Googly eyes, Steelfoot. The idea of them make me giggle when I saw them on the approval page. :)
 
Papriko
Peppery One

Papriko



  11/2/2009

It is not specifically to one of your questions, but you also wanted to know how to get better with CAOS. I did it so. First I got very little basics like kill hots. You probably already have them when you published the Calm Balm Vendor and the Googly Eyes.
Then I looked through random DS cosfiles and look at the commands they use. So it becomes slowly but sure more.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Steelfoot

Steelfoot



  11/2/2009

Ghosthande, I'm assuming by the "CAOS documentation that comes with DS," you mean the following CAOS command?


file oope 1 "CAOS alphabetical.html" 0 dbg: html 0 file oclo


I definitely find it helpful now that I know it exists! If it's not that, though, do point me towards it. And again, thanks for all of the directions!

Laura, I cracked up when I saw the front page. It was like opening it up this morning and having it stare back at me. It was, at the same time, unnerving and amusing.

Papriko, I actually ended up disassembling the Calm Balm agent provided in the Hardman Norn pack trying to figure out how it was capable of reducing anger since I'm used to "stim writ from [insert chemical compounds here]" from back in the C1 days. Even that has changed a bit from what I'm used to!

And to add to the "how do I do x?" theme I have going here:

-How would I go about changing an object's script after a certain event? Say, if the user pushes a button, it vends carrots instead of cheese?
-Is the "reserved agent script number list" over on Bibbleworld still updated? Do I still need to reserve a series of script numbers? If so, I'll modify all of my uploaded agents to use script numbers registered to me instead of 742, which happens to be my favorite number.

 
Laura
Tea Queen

Laura

Administrator


 visit Laura's website: CC Chat
  11/2/2009

Steelfoot wrote:
Laura, I cracked up when I saw the front page. It was like opening it up this morning and having it stare back at me. It was, at the same time, unnerving and amusing.


Yes, they are very EYE-catching...

... XD

(I believe they show up as gigantic on the front page because the thumbnail image is tiny, or something? Doesn't matter though!)

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/2/2009

Yes, that's it!

1. By using variables. My Metamorphosing Toy Tutorial actually covers exactly how to do this, even though the subject matter is somewhat different, the exact same strategy applies.

2. I'm not sure if Bibbleworld is still updated. I've e-mailed the address they provide at least three times and have never even gotten a reply, much less have they added me on. :( Reserving a group of numbers is definitely still important, however, to prevent clashing.



 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  11/2/2009

What's wrong with the Creatures Wiki?

My TCR Norns
 
xan

xan



  11/2/2009

if you didn't know about the caos manual... are you using the CAOS developer tool?
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/2/2009

^ Malkin: the Creatures Wiki wasn't working earlier. If you tried to visit all you got was a blank white page. It seems to be fine now though.


 
Malkin

Malkin

Manager


 visit Malkin's website: Malkin's page at CWiki
  11/2/2009

Phew, thanks Ghosthande. :)

My TCR Norns
 
Yamishi

Yamishi



  11/2/2009

Lol yeah the googly eyes are funny, they made me laugh. I really don't know anything about CAOS, even though I tried it once, it just frustrated me and I really haven't tried it since. I really doubt that I'm any better at it now :o
 
Steelfoot

Steelfoot



  11/3/2009

Ghosthande, I had originally sort of classified variables as a sort of "randomizer" idea, but using variables to "if one, add one, if two, subtract one" never actually occurred to me. Also, from this point forth, I am reserving the 64452-64499 object range, provided that doesn't clash with anyone. It was open according to BW so I basically picked arbitrarily. Unless someone else complains, I don't see much of a need to move my objects created so far to that range, but if it would be easier on everyone for me to change it I will do so and resubmit.

Starscream, I am using the CAOS tool provided by the CDN. Is there a better one?

And at the moment, I actually have nothing to ask. Other people would be free to ask too, of course, and I'll try to help there too. :3

Also, I'm apparently blind and cannot find a tutorial on anything. Thanks for bearing with me. XP

 
Steelfoot

Steelfoot



  11/3/2009

OKAY I LIED, one last question for now:

Is there a way to make the screen shake when an event happens? I can't seem to find a CAOS for that. If not, no biggie, my next agent can do without that.

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/3/2009

I don't think so. There definitely don't seem to be any commands for it, and I've yet to find a code that can do that.


 
Papriko
Peppery One

Papriko



  11/3/2009

There is a command (or code) to let the camera slide to another position. Maybe that could be used when you let it slide randomly a few pixels in all directions.

Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Steelfoot

Steelfoot



  11/3/2009

Well, no wonder I couldn't find it I guess, it doesn't exist! Though the camera sliding idea is interesting, for sure.

OKAY LAST ONE, I feel bad having you all run around in circles constantly for me but hopefully what I'm coming up with will make up for it D:

Do I have to include the scripts of everything an agent (especially a vendor) can spawn, if the object to be created exists in the game? Say if I want a vendor that produces a regular old carrot or mundane piece of cheese, do I have to include the scripts for the carrot/cheese that already exists in the game? If not, how do I go about doing this?

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/3/2009

No you don't have to include scripting if it already exists. If, say, you're making a vendor that vends standard carrots, all you have to do is include the full install script when the agent makes it, with the attr, bhvr, perm, etc. lines like you do when making a vendor create anything. Since all the sound effects, images and behavior scripts will already be in the game there's no need to include them.


 
Steelfoot

Steelfoot



  11/3/2009

Very well then! Thanks so much :3

I'm currently working on my next doodad--it's gonna be a toy, with some pretty new to me script that I'm still hammering out, plus 4 sound effects (one of which is a vocoded sample of my own voice!), and some random surprises. With any luck, and given that the twin ear infections I'm dealing with don't crawl into my brain and kill me, I'll have it done sometime in the next day or two.

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  11/3/2009

Yeowch. I feel for you. Rest up!


 
Steelfoot

Steelfoot



  11/4/2009

Aaaaand it's done :3

It's approved and everything now! I was a little hesitant to release it to CCSF '09, so I didn't. Though it's the best thing I've ever made, it's not quite on par with new metarooms and some of the other amazing doodads that are uploaded, but I'm still proud of it and thankful to those whom helped.

Huzzah!

 


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