Jump to content

  • Log In with Google      Sign In   
  • Create Account

My Scripting Language needs a quick lookover


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 SeanHowe   Members   -  Reputation: 142

Like
Likes
Like

Posted 29 May 2000 - 04:40 PM

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

Sponsor:

#2 SeanHowe   Members   -  Reputation: 142

Like
Likes
Like

Posted 29 May 2000 - 04:42 PM

on the ON part of that, it''s supposed to be
ON <event> {...}





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS