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
My Scripting Language needs a quick lookover
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?
-------------------------------NeXe: NeHe DirectX-style. Follow the orange rabbit.
on the ON part of that, it''s supposed to be
ON <event> {...}
ON <event> {...}
![](smile.gif)
-------------------------------NeXe: NeHe DirectX-style. Follow the orange rabbit.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement