STUFF TO IMPLEMENT:

	lastcollidex;
	lastcollidey;
	

	player_alive()
	powerup_enable()
	powerup_disable()
	entity_taga()
	entity_tagb()
	entity_tagc()

new entity stuff:
	onkill
	onaction
	onanimate
	ondamage
	
	DealDamage(x);
	DoAnimate();
	DoAction();
	
	collideplayer(entity)
	
	collideentity(entity, entity)??
	
	



	event_leftclick()
	event_rightclick()
	event_middleclick()
	event_middlescroll()
	event_playermove()
	event_keypress()
	
	job_useinternetranking()
	
	job_direction() // standard/vertical/horizontal
	job_changedirection() // changes the dir in the middle of a level?
	job_xaccel() // use x pos to to x momentum
	job_yaccel() // use y pos to to y momentum
	
	COLLIDE_NOTPLAYER
	
	gunshot control stuff
	
	dynamic changing of
		background tile
		star count
		background speed
		star speed
	
	ability to save mission data between games?
	



NEW SCRIPTING LANGUAGE:

	The new scripting language is based on C. It does not support all of the syntax that C does, but it has enough to do just about anything you will need.
	Since I don't want to write a book right now, I am going to advise you look at some of the sampel scripts that come with Eliter if you want to see how the language works. It is pretty simple to catch on if you know C. Here are some things you should note however:
	
	The scripting language supports user-defined variables, but there is no declaring needed to use them.
	
	- All variables when first referenced are created as type-less, but become a certain type when they are first assigned to.
	- There is no order-of-operations, each operation must be seperated with parenthesis if it contains more than one operator.
	- For more information on the language itself, see script.txt
	
Things That Have Not Been Tested Much:
	- all of the entity accessors functions have been implemented, but
	have not all been individually tested. They should work, but let me know
	  if any act strange.
	  
Stuff To Added in the Future:
	User Defined Functions (this is planned for the next release)
	allow gamestate setting?
	more player property settings?
	  
	  
The remainder of this document consists of documented functions you can use in your eliter script followed by
a list of all the eliter script identifiers. The identifiers are not documented since there are so many of them,
but you can browse the list and try them out if you would like. They have not all been tested but they should all
function correctly. If you have questions regarding a particular function, please e-mail sailorh@chibinet.com .

Unless a return value is specifically mentioned, all functions return 1 for success and 0 for failure.
	  
GENERAL FUNCTIONS:

	entity(INTEGER type, STRING name)
		Creates and entity with the type key specified and the name specified.
		If an entity with that name already exists, this function uses the existing entity instead and does not create a new one.
		All preceding entity_xxx() calls will apply to this entity until entity() or get_entity() is called.
		Specify a name if you wish to refer to this entity later. Any entity name is allowed except for "0" which is reserved for unnamed entities.
		
	entity_get(STRING name)
		Retrieved the entity named name. Preceding calls to entity descriptor functions will all effect this entity.
		If no entity with that name is found, the entity pointer is set to NULL causing preceding entity decriptors to have no effect.
		Returns an integer value of 0 if no match was found, and non-zero if an entity was found.

	message(STRING string, INTEGER time)
		Displays string on the screen for the player to read. The message will fade away after time seconds.

	player_addpowerup(key)
	player_removepowerup(key)
		Gives and takes away (respectively) the player powerup associated with a key.
		TODO: list powerup keys
		GUNSPEED	1	Shoot twice as fast
		GUNWAVE		2	Shots wave
		GUNBEAM		3	Beam shots, much stronger
		GUNSPREAD	4	Gunshots spread
		GUNDUAL		5	Two Additional side guns
		GUNTRI		6	Additional Middle gun
		
	success(int)
		Sets ths success value.
		NONE	0	Nothing, use this for non-mission type levels that do not need a mission status screen when the game ends.
		FAILED	1	The player failed to meet the objective
		OK		2	The player was successful
		PERFECT	3	The player did beyond the requirement, something REALLY impressive
		
	gameover()
		Ends the current mission using the success value last set. (default is 0)
		If the success value is greater than 0 (NONE) a mission status screen will be shown.
	  	
JOB DESCRIPTORS:


ENTITY DESCRIPTORS:

	The following entity descriptors all also has equivilent "get" versions of the same function:
	
	
	
IDENTIFIER TABLE: (undocumented extra information)
	
STRING eliter_version = "Eliter Version 2.2"
INT screenwidth = 800
INT screenheight = 600
STRING LITER = "1"
STRING SODA = "2"
STRING NACHO = "3"
STRING TRISCUT = "4"
STRING JONES = "5"
STRING PI = "3.141592654"
STRING GUNSPEED = "1"
STRING GUNWAVE = "2"
STRING GUNBEAM = "3"
STRING GUNSPREAD = "4"
STRING GUNDUAL = "5"
STRING GUNTRI = "6"
STRING NONE = "0"
STRING FAILED = "1"
STRING OK = "2"
STRING PERFECT = "3"
STRING SEC = "100"
STRING MIN = "6000"
STRING SECOND = "100"
STRING MINUTE = "6000"
INT player_health = 1
INT player_alpha = -842202881
INT player_slow = 0
FUNCTION job_name(STRING value) RETURNS STRING
FUNCTION job_description(STRING value) RETURNS STRING
FUNCTION job_tilesbmp(STRING value) RETURNS STRING
FUNCTION job_spritesbmp(STRING value) RETURNS STRING
FUNCTION job_difficulty(INTEGER value) RETURNS INTEGER
FUNCTION job_reward(INTEGER value) RETURNS INTEGER
FUNCTION job_stars(INTEGER value) RETURNS INTEGER
FUNCTION job_gamespeed(INTEGER value) RETURNS INTEGER
FUNCTION job_tilesize(INTEGER value) RETURNS INTEGER
FUNCTION job_playerspeed(FLOAT value) RETURNS FLOAT
FUNCTION job_tilexspeed(FLOAT value) RETURNS FLOAT
FUNCTION job_tileyspeed(FLOAT value) RETURNS FLOAT
FUNCTION job_start(CODE value) RETURNS INTEGER
FUNCTION job_gameloop(CODE value) RETURNS INTEGER
FUNCTION job_finish(CODE value) RETURNS INTEGER
FUNCTION random(INTEGER value) RETURNS INTEGER
FUNCTION randomx() RETURNS INTEGER
FUNCTION randomy() RETURNS INTEGER
FUNCTION asin(FLOAT value) RETURNS FLOAT
FUNCTION acos(FLOAT value) RETURNS FLOAT
FUNCTION atan(FLOAT value) RETURNS FLOAT
FUNCTION sin(FLOAT value) RETURNS FLOAT
FUNCTION cos(FLOAT value) RETURNS FLOAT
FUNCTION tan(FLOAT value) RETURNS FLOAT
FUNCTION exp(FLOAT value) RETURNS FLOAT
FUNCTION log(FLOAT value) RETURNS FLOAT
FUNCTION log10(FLOAT value) RETURNS FLOAT
FUNCTION pow(FLOAT valueFLOAT value) RETURNS FLOAT
FUNCTION sqrt(FLOAT value) RETURNS FLOAT
FUNCTION message(STRING valueINTEGER value) RETURNS INTEGER
FUNCTION success(INTEGER value) RETURNS INTEGER
FUNCTION gameover() RETURNS INTEGER
FUNCTION player_setalpha(INTEGER value) RETURNS INTEGER
FUNCTION player_getalpha() RETURNS INTEGER
FUNCTION player_addpowerup(INTEGER value) RETURNS INTEGER
FUNCTION player_removepowerup(INTEGER value) RETURNS INTEGER
FUNCTION entity(INTEGER valueSTRING value) RETURNS STRING
FUNCTION entity_select(STRING value) RETURNS INTEGER
FUNCTION entity_exists(STRING value) RETURNS INTEGER
FUNCTION entity_onkill(CODE value) RETURNS INTEGER
FUNCTION entity_timer(INTEGER value, INTEGER valueSTRING value) RETURNS STRING
FUNCTION entity_timerevent(CODE value) RETURNS INTEGER
FUNCTION entity_onalive(CODE value) RETURNS INTEGER
FUNCTION entity_type(INTEGER value) RETURNS INTEGER
FUNCTION entity_alpha(INTEGER value) RETURNS INTEGER
FUNCTION entity_flip(INTEGER value) RETURNS INTEGER
FUNCTION entity_rotate(INTEGER value) RETURNS INTEGER
FUNCTION entity_real_sx(FLOAT value) RETURNS FLOAT
FUNCTION entity_real_sy(FLOAT value) RETURNS FLOAT
FUNCTION entity_real_sxl(FLOAT value) RETURNS FLOAT
FUNCTION entity_real_syl(FLOAT value) RETURNS FLOAT
FUNCTION entity_sx(FLOAT value) RETURNS FLOAT
FUNCTION entity_sy(FLOAT value) RETURNS FLOAT
FUNCTION entity_sxl(FLOAT value) RETURNS FLOAT
FUNCTION entity_syl(FLOAT value) RETURNS FLOAT
FUNCTION entity_ix(INTEGER value) RETURNS INTEGER
FUNCTION entity_iy(INTEGER value) RETURNS INTEGER
FUNCTION entity_ixl(INTEGER value) RETURNS INTEGER
FUNCTION entity_iyl(INTEGER value) RETURNS INTEGER
FUNCTION entity_mx(FLOAT value) RETURNS FLOAT
FUNCTION entity_my(FLOAT value) RETURNS FLOAT
FUNCTION entity_mz(FLOAT value) RETURNS FLOAT
FUNCTION entity_maxhealth(INTEGER value) RETURNS INTEGER
FUNCTION entity_health(INTEGER value) RETURNS INTEGER
FUNCTION entity_debris(INTEGER value) RETURNS INTEGER
FUNCTION entity_score(INTEGER value) RETURNS INTEGER
FUNCTION entity_count(INTEGER value) RETURNS INTEGER
FUNCTION entity_anim(INTEGER value) RETURNS INTEGER
FUNCTION entity_maxanim(INTEGER value) RETURNS INTEGER
FUNCTION entity_get_name() RETURNS STRING
FUNCTION entity_get_type() RETURNS INTEGER
FUNCTION entity_get_alpha() RETURNS INTEGER
FUNCTION entity_get_flip() RETURNS INTEGER
FUNCTION entity_get_rotate() RETURNS INTEGER
FUNCTION entity_get_real_sx() RETURNS FLOAT
FUNCTION entity_get_real_sy() RETURNS FLOAT
FUNCTION entity_get_real_sxl() RETURNS FLOAT
FUNCTION entity_get_real_syl() RETURNS FLOAT
FUNCTION entity_get_sx() RETURNS FLOAT
FUNCTION entity_get_sy() RETURNS FLOAT
FUNCTION entity_get_sxl() RETURNS FLOAT
FUNCTION entity_get_syl() RETURNS FLOAT
FUNCTION entity_get_ix() RETURNS INTEGER
FUNCTION entity_get_iy() RETURNS INTEGER
FUNCTION entity_get_ixl() RETURNS INTEGER
FUNCTION entity_get_iyl() RETURNS INTEGER
FUNCTION entity_get_mx() RETURNS FLOAT
FUNCTION entity_get_my() RETURNS FLOAT
FUNCTION entity_get_mz() RETURNS FLOAT
FUNCTION entity_get_maxhealth() RETURNS INTEGER
FUNCTION entity_get_health() RETURNS INTEGER
FUNCTION entity_get_debris() RETURNS INTEGER
FUNCTION entity_get_score() RETURNS INTEGER
FUNCTION entity_get_count() RETURNS INTEGER
FUNCTION entity_get_anim() RETURNS INTEGER
FUNCTION entity_get_maxanim() RETURNS INTEGER
