*++++++++++++++++++++++++++++++++++++++++++++*
*++ Complex Food (multiple Bites) Tutorial ++*
*++++++++++++++++++++++++++++++++++++++++++++*

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ This file is commented and can be just copied and pasted and    +*
*+ with a little tinkering can be used properly! So Lets get       +*
*+ started on this, and teach you how to make your norns something +*
*+ yummy, that will last for an extra few bites! This is a follow  +*
*+ up to the last tutorials and so you should have read them first!+*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ Here is the break done of the different classifications +*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+Family      Genus         species              Object    +*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ 2            8     (Get one from the CDN)     Fruit     +*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ Find more out on Classification at:                            +*
*+ http://www.creaturelabs.com/cdn/index.pl?articleid=15&style=0  +*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*


*++++++++++++++++++*
*+ Install script +*
*++++++++++++++++++*

inst

*++++++++++++++++++++++++++++*
*+ Covered in Tutorial #1   +*
*++++++++++++++++++++++++++++*

new: simp 2 8 46003 "complexfoodMNB" 3 0 2000
attr 195
bhvr 48
perm 64
elas 40
accg 4
fric 100
setv va00 game "CreatorX"
setv va01 game "CreatorY"
doif va00 eq 0 and va01 eq 0
	setv va00 5687
	setv va01 3670
endi
mvsf va00 va01
emit 8 .5
tick 2000
endm


*++++++++++++++*
*+ Eat Script +*
*++++++++++++++*

scrp 2 8 46003 12

*+++++++++++++++++++++++++++++++*
*+ Locks the script so it can  +*
*+ not be activated while this +*
*+ script is still running     +*
*+++++++++++++++++++++++++++++++*

	lock

*+++++++++++++++++++++++++++++++++++++++++++++*
*+ addv is a way of the game adding a number +*
*+ to another, so every time the agent's     +*
*+ eat script is activated is then tells     +*
*+ the agent to change the pose, you         +*
*+ can see that happening below with the     +*
*+ flow commands.                            +*
*+++++++++++++++++++++++++++++++++++++++++++++*
	addv ov01 1

*+++++++++++++++++++++++++++++++++++++++++++++*
*+ This tells the game is something activates+*
*+ the agent then do all this, Make the sound+*
*+ inject the stim, which in this case is    +*
*+ eaten fruit, and then commented out is    +*
*+ the chemical injection, you can add this  +*
*+ if you want.                              +*
*+++++++++++++++++++++++++++++++++++++++++++++*

	doif from <> null
		snde "chwp"
		stim writ from 78 1

**********************************************************
*		targ from
*		chem X Y x= chemical number y = amount
**********************************************************

	endi
	targ ownr

*+++++++++++++++++++++++++++++++++++++++++++++*
*+ This is the part where you learn how to   +*
*+ make multiple bites!                      +*
*+++++++++++++++++++++++++++++++++++++++++++++*
*+ This set of flow commands tell the agent  +*
*+ is the addv ov01 number is 1 then to make +*
*+ the agent go to pose 1, if the ov01 number+*
*+ is 2 then make it pose 2, and when the    +*
*+ number hits 3 the agent funs out of images+*
*+ I want to be shown and is killed off!     +*
*+++++++++++++++++++++++++++++++++++++++++++++*

	doif ov01 = 1
		pose 1
	elif ov01 = 2
		pose 2
	elif ov01 = 3
		kill ownr
	endi
endm

*++++++++++++++++++++++++++++*
*+ Covered in Tutorial #1   +*
*++++++++++++++++++++++++++++*
*+++++++++++++++*
*+ Drop Script +*
*+++++++++++++++*

scrp 2 8 46003 6
	snde "dr10"
endm

*++++++++++++++++++++++++++++*
*+ Covered in Tutorial #1   +*
*++++++++++++++++++++++++++++*
*++++++++++++++++*
*+ Timer Script +*
*++++++++++++++++*

scrp 2 8 46003 9
	kill ownr
endm

*+++++++++++++++++*
*+ Remove script +*
*+++++++++++++++++*

rscr
enum 2 8 46003
	kill targ
next
endm