|
Development Forum |
 |
| Agent questions: injecting chemicals? | |
|
 Carrot Beetle
DragonSparke

|
5/23/2015 | |
Okay so I've taken it upon myself to create at least one agent - I now successfully have a food item that can be eaten. Given that it's a spicy food item, I want it to cause a small amount of pain, hotness, and boredom decrease to the creature that eats it (spicy foods are exciting, after all). Can anyone point me towards what to do? preferably with a bit of explanation, i'd like to think I'm learning!
I THINK what I want is the CHEM command?
Ah, should have mentioned, this is for C3/DS |

Malkin
     Manager

|
5/23/2015 | |
Hey, congratulations on making your first agent! Check out the CHEM article on the Creatures Wiki, it might have some pointers.
You start off with your script and your stimulus:
scrp 2 8 1000 12
stim writ from 78 1 |
In order to inject a creature with chemicals, first you have to use TARG to choose who to inject.
Because we're using an agent to inject these chemicals for us, we can use the FROM command - which means in this circumstance 'whatever activated this agent'.
So,
Then, from the C3 chemical list, we choose the chemicals we want, and write down the number that means that chemical. (e.g. hotness is 153)
To inject chemicals in C3/DS, we can choose any number we like, as long as it's between 1.0 (a full jolt of that chemical) and -1.0 (removing all of the existing chemical).
*add a small amount of Vitamin C
chem 99 0.05
*reduce hotness by one-fifth
chem 153 -0.2
|
Then we return TARG to the agent itself - so that any further actions will work on the agent, not the norn. (like, say, destroying the fruit item rather than the norn.)
Then you go on with the rest of your script. I hope this helps!
My TCR Norns |
 Carrot Beetle
DragonSparke

|
5/23/2015 | |
Thanks Malkin I'll be sure to post it here when it's done!
So I have, in addition to the rest of my script,
targ from
chem 153 0.1
chem 148 0.05
chem 159 -0.1
targ ownr |
Which, if I'm understanding right, will inject a small amount of hotness, a little bit of pain, and remove a little bit of boredom? |

Malkin
     Manager

|
5/23/2015 | |
That looks about right - don't forget to comment your code! 
My TCR Norns |
 Carrot Beetle
DragonSparke

|
5/23/2015 | |
Okay, now I'm looking silly - what's the command to comment out code? I thought it was the asterisk but it doesn't seem to be. |

Malkin
     Manager

|
5/23/2015 | |
Maybe the asterisk needs to be right at the beginning of the line - no stray spaces or anything. Are you using the CAOS Tool?
My TCR Norns |
 Carrot Beetle
DragonSparke

|
5/23/2015 | |
I am - and you are right! - I can't comment halfway through a line, it has to start at the beginning. |