• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# My Scripting Language needs a quick lookover

## 1 post in this topic

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
0

##### Share on other sites
on the ON part of that, it''s supposed to be
ON <event> {...}
0