My Scripting Language needs a quick lookover

Started by
0 comments, last by SeanHowe 23 years, 11 months ago
Here''s the basic design of my scripting language. Can somebody take a quick look over it to see if you can catch anything I might be missing?

Variables That Can Be Accessed:
	PLAYER is defined as the group of
	{
		float x
		float y

		float jumpSpeed
		float jetFuel
		bool thrusting
		
		int health
		
		int facing

		WEAPON curWep
		WEAPON nextWep
		WEAPON lastWep

		@FireWeapon
		@IncreaseThrust
		@StartThrust
		@MoveLeft
		@MoveRight
  	}

PLAYER ClosestEnemy 
PLAYER FarthestEnemy 
PLAYER Self
PLAYER ClosestFriend 
PLAYER FarthestFriend 
	PLAYER EvokedEvent
Events:
	ATTACKED
	ENEMYENTEREDSIGHT
	ENEMYCANSEE	
	ENEMYLEFTSIGHT
	FRIENDENTEREDSIGHT
	FRIENDCANSEE
	FRIENDLEFTSIGHT
	KILLEDENEMY
Statements:
	ON  { … }
	IF (logical statement) { … }

Basic Syntax:
	There’ll be ON  for each event the script wants to have a handler for. It’ll be executed 
Each time the event is called. An @ sign indicates a function. Here is an example syntax of a file to give you some idea:

ON  
{
	IF (Self.x > EvokedEvent.x)
	{
		Self.@MoveLeft		
Self.@FireWeapon
	}
}
 
Bunnies At War - A new wave in bunnydom! http://users.moscow.com/rikhowe/baw/baw.asp
Advertisement
on the ON part of that, it''s supposed to be
ON &ltevent> {...}

This topic is closed to new replies.

Advertisement