Showing posts with label CCSF. Show all posts
Showing posts with label CCSF. Show all posts

Tuesday, 17 January 2017

Fixed Turkey and Fixed Pudding

I hope everyone enjoyed the Creatures Community Spirit Festival 2016 - I know I did.  Congratulations to Allekha and Doringo for pulling it all together!

I thought I should post a CAOS walkthrough of the Fixed Christmas Pudding and Fixed Turkey (they are identical, bar the sprites and class numbers used) to demonstrate how they work.


First, the original script:
scrp 2 6 5 1
snde chwp 
stim writ from 10 255 0 0 35 250 34 10 57 150 0 0 
pose 1 
endm

Note how the pudding doesn't vanish from the world (using KILL) in the eat script here - this is accomplished by the drop script in the original, leading to a food item that only vanishes once it is dropped - not so good for learning!

The fixed editions have an additional feature that turns these from one-shot treats to easy-to-find emergency rations.

*Eat script for the pudding
scrp 2 6 5 1
*Make a noise
snde chwp
*stimulate the thing that made the script fire, jiggle its brain a little, and give it some nutrients
stim writ from 10 255 0 0 35 150 34 30 57 150 0 0
*strike a pose
pose 1
*WAIT for a second
wait 10
*If there's only one pudding in the world (the eaten pudding in the creatures' paws)...
doif totl 2 6 5 eq 1
*instantaneously
inst
*create a new pudding
new: simp holi 3 0 3500 0
*identical in class to the one before it
setv clas 33948928
*put it in the kitchen
mvto 2934 900
*same attributes
setv attr 67
*same behaviours
bhvr 0 1
*it says hello to the world, and is ready to eat
mesg writ targ 8
*end the if-there's-only-one-pudding check
endi
*the eaten pudding removes itself in its own eat script
kill ownr
*and the script ends
endm

Monday, 7 December 2015

Blue Drum Walkthrough

 Hopefully by now, you're enjoying the Creatures Community Festival 2015!  I thought I would post up a CAOS walkthrough of the Blue Drum COB I made, with the aid of The Lone Shee's C1 Scriptorium Browser, CrEd32 and BoBCoB.

Install script:

inst
Install this COB in one tick.
new: simp bdru 1 0 3500 0
Our COB is a simple object, using one image from the bdru.spr file, and it will appear in front of the creatures who use it.
setv clas 34147072
the COB is in class 2, genus 9 and species 11.
setv attr 70
The hand can pick up the drum, the hand can activate the drum, and the COB is "wallbound".
bhvr 2 3
The hand can bang the drum even if it's already banging.  Creatures can push and pull the drum.
edit
The drum will appear in the hand when it's been injected into the world.
endm
End of the install script.

Push script:

scrp 2 9 11 1
The script for family 2, genus 9, species 11, activation function #1.
snde drm1
Make a drum noise.
stim writ from 10 255 0 0 43 50 34 60 22 10 44 50
If you were the drummer, you get the following C1 chemicals: 50 Boredom Decrease, 60 NFP Decrease, 10 Tiredness Increase, 50 Anger Decrease.
stim shou 10 255 0 4 43 5 34 5 0 0 0 0
If you were listening to the drumming, you get the following C1 chemicals: 5 Boredom Decrease, and 5 NFP Decrease.
endm
End script.

Pull script:

scrp 2 9 11 2
The script for family 2, genus 9, species 11, activation function #2.
snde drm1
Make a drum noise.
stim writ from 10 255 0 0 43 50 34 60 22 10 44 50
If you were the drummer, you get the following C1 chemicals: 50 Boredom Decrease, 60 NFP Decrease, 10 Tiredness Increase, 50 Anger Decrease.
stim shou 10 255 0 4 43 5 34 5 0 0 0 0
If you were listening to the drumming, you get the following C1 chemicals: 5 Boredom Decrease, and 5 NFP Decrease.
endm
End script.


External script:

scrp 2 9 11 17
This script is called for the creature that pushes the drum. For this script, OWNR means the creature and the drum is _IT_.
impt 3
Tells the creature that what it's about to do is slightly important.
aim: 0
Makes the creature go to the right place on the drum to activate it.
appr
Approach the drum.
wait 4
Wait a little bit.
reps 6
Repeat the following actions 6 times:
pose 69
Go into pose 69
snde drm1
Play drumming sound if you're visible on screen.
pose 70
Go into pose 70
snde drm1
Play drumming sound if you're visible on screen.
repe
Finish the 6 times repetition of posing and drumming.
mesg writ _it_ 0
Call Script #1 (push script) for the drum.
pose 12
Take pose 12.
wait 4
Wait a bit.
impt 0
The next action you're about to take isn't important at all.
wait 20
Wait a bit longer.
done
Tells the creature that the action has been completed.
endm
Ends the script.

External script for the hand:

scrp 2 9 11 50
This script is called for the hand when the hand activates the drum.
anim [4540]
Make the hand appear to slap the drum and go back to normal.
endm
End the script.

The removal scripts are handled in the RCB, as always.  Check out the Creatures CAOS Guide to learn more about the commands used in this object.