
*+++++++++++++++++++++++++++*
*++ Food Vendor 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 +*
*+ that will vend them something to eat! This is a follow up to    +*
*+ the last tutorial and so you should have read it first!         +*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*

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


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

inst

*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ This classification is set to Vendor/dispencer.        +*
*+ This New: simp tells the game it's a                   +*
*+ Simple agent. Later on I will cover compound!          +*
*+ For this tutorial we are using a set of sprites by me. +*
*+ 21 = the number of images used in the agent,           +*
*+ while 0 is the image number that the agent starts at   +*
*+ in the file. 900 is the plane.                         +*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*

new: simp 2 23 46005 "foodvendortutorialMNB" 21 0 900

*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ This is the anim command! If placed in the install script the  +*
*+ agent will do the animation when injected, and if 255 is added +*
*+ to the end it will repeat the animation forever.               +*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*

anim [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 255]

*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ All the agent attributes where covered in the last tutorial +*
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
*++++++++++++++++++++++++++++++++++++++++++*
*+ Agent attributes                       +*
*++++++++++++++++++++++++++++++++++++++++++*
*+ 2   = Mouseable                        +*
*+ 4   = Activateable                     +*
*+ 64  = Suffer Collisions                +*
*+ 128 = Suffer Physics                   +*
*++++++++++++++++++++++++++++++++++++++++++*

attr 198

*++++++++++++++++++++++++++++++++++++++++++*
*+ Creature Permissions                   +*
*++++++++++++++++++++++++++++++++++++++++++*
*+ 1 = Activate 1                         +*
*+ 2 = Activate 2                         +*
*++++++++++++++++++++++++++++++++++++++++++*

bhvr 3

perm 60
accg 4
fric 100
elas 40


*+++++++++++++++++++++++++++++++++++++++++++++*
*+ This is the new script used for injecting +*
*+ agents into C3 as well as DS,due to the   +*
*+ different x and Y cooridnates!            +*
*+++++++++++++++++++++++++++++++++++++++++++++*

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

endm

*+++++++++++++++++++++*
*+ Activate 1 Script +*
*+++++++++++++++++++++*

scrp 2 23 46005 1
	snde "beep"
	lock

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

	inst

*+++++++++++++++++++++++++++++++++++++++++++++++++*
*+ sets variable 00 to posl (left side of agent) +*
*+++++++++++++++++++++++++++++++++++++++++++++++++*

	setv va00 posl

*++++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ Tells the computer the left postion on the agent +*
*+ in which to make the new agent appear            +*
*++++++++++++++++++++++++++++++++++++++++++++++++++++*

	addv va00 48

*+++++++++++++++++++++++++++++++++++++++++++*
*+ sets variable 01 to post (top of agent) +*
*+++++++++++++++++++++++++++++++++++++++++++*

	setv va01 post

*+++++++++++++++++++++++++++++++++++++++++++++++++++*
*+ Tells the computer the top postion on the agent +*
*+ in which to make the new agent appear           +*
*+++++++++++++++++++++++++++++++++++++++++++++++++++*

	addv va01 105

*++++++++++++++++++++++++++++*
*+ Covered in last tutorial +*
*++++++++++++++++++++++++++++*

	new: simp 2 11 46005 "foodvendortutorialMNB" 1 21 4500
	attr 195
	bhvr 48
	perm 60
	accg 4
	fric 100
	elas 40
	mvsf va00 va01
	emit 8 .5
	tick 1000
	slow
endm

*+++++++++++++++++++++*
*+ Activate 2 Script +*
*+++++++++++++++++++++*

scrp 2 23 46005 2
	call 1 0 0
endm

*++++++++++++++++++++*
*+ Collision Script +*
*++++++++++++++++++++*

scrp 2 23 46005 6
	snde "dr10"
endm

*++++++++++++++++*
*+ Food Scripts +*
*++++++++++++++++*
*++++++++++++++++++++++++++++++++*
*+ All covered in Last Tutorial +*
*++++++++++++++++++++++++++++++++*

scrp 2 11 46005 12
	lock
	snde "reat"
	stim writ from 79 1
	kill ownr
endm

scrp 2 11 46005 9
	kill ownr
endm

scrp 2 11 46005 6
	snde "dr10"
endm

*+++++++++++++++++*
*+ Remove Script +*
*+++++++++++++++++*

rscr

enum 2 11 46005
	kill targ
next
enum 2 23 46005
	kill targ
next
endm