playerenters | This flag is returned as true when a player enters the level. |
playertouchsme | This is returned as true when the NPC is touched by a player. |
playertouchsother | This is true when the player touches some other NPC. |
playerlaysitem | True when an item is laid on the level. |
playerchats | Used to see if the player has said anything. |
playerdies | Is true when the player has lost all of his/her life. |
playerhurt | Called when the player has taken damage. |
playerendsreading | Returned as true when the player finishes reading a sign (any sign, does not have to be one that the NPC said). |
playerreading | True when the player is currently reading a sign. |
carrying | If the player is carrying an object. |
carriesbush | If the object carried is a bush this is true. |
carriessign | True is the player is carrying a sign. |
carriesvase | Returned as true when the player carries a vase. |
carriesstone | If the player is carrying a stone, this is true. |
carriesblackstone | If the player is carrying a blackstone this is true. |
playeronhorse | Retuurned true if the player is currently on a horse or boat. |
playerswimming | True if the player is in deep water, so he/she is swimming. |
playerismale | True if the player is male (this is set when they choose their character). |
playerisfemale | True if the player is female (this is set when they choose their character). |
playeronline | Returns true if the game is in online mode. |
playerattached | True if the player is attached to this NPC. |
playerpaused | This is true if the player is currently paused. |
playermap | True if the player is currently at the map screen. |
strequals( str1, str2 ) | This checks to see if two strings are equal to one another. For example: strequals(#w,Bow) That would be true if the currently selected weapon (denoted by #w) has the name of "Bow". |
strcontains( str1, str2 ) | True if the first string contains the second string. For example: strcontains(#w,Fire) would be true if the currently selected weapon (denoted as #w) has "Fire" in its name. So it'd be true for "Fireball", "Fireblast" and any other NPC weapons using the word "Fire" in it's name. |
startswith(partstr,str) | This is true if the value of the string "str" begins with "partstr". |
keydown(0...10) | 'keydown' is keyboard key currently
being pressed.
Values are as follows. 0 - up arrow 1 - left arrow 2 - down arrow 3 - right arrow 4 - A 5 - S 6 - D 7 - map 8 - tab 9 - Q 10 - P So if keydown is 1, then that means the left arrow is being pushed. |
lighteffectsenabled | Is true if the player can see lighting effects set by "seteffect" etc... |
isleader | If there is more than one player in the level, this is returned true only for the player that entered the level first. |
isonmap | This flag is returned true if the player is on a level that is on the map (so it's contained within the map.txt file). |
hasweapon(name) | This is true if the player has the weapon specified in their weapon inventory. |
canspin | If the player has collected the spin move, and can do the spin attack, this flag is true. |
compsdead | This is true after all the compus have been killed. Differes from compusdied in that compus died is returned as true when all the compus have died; this implies they have been dead. |
compusdied | True if all the baddies on the level have been killed. |
onwall(x,y) | An onwall occurs when the tile at location x,y is a "wall". Walls are anything that the players and baddies can not walk through. Unless the "dontblock" command was used, all NPC's are also considered onwall. |
onwall2(x,y,w,h) |
onwall2 works exactly like onwall
(above) except you can specify a width and a height for the NPC to
check. |
onwater(x,y) | This flag is true if the tile specified at ( x, y ) is a water deep water tile. |
weaponsenabled | Returned as true when the player's weapons are enabled. |
timeout | When the "timeout" variable has finished counting down to 0, this is true. |
followsplayer | True when "followplayer" has been set earlier. |
visible | If the NPC is not hidden, this is true. |
isweapon | If the NPC is a weapon (in the player's list) than this is true. |
weaponfired | If the "D" button was pressed and the NPC is in the weapon list. Also, the NPC has to be the currently selected weapon. |
firedonhorse | If the "D" button was pressed and the NPC is a weapon, and the player is on a horse. Also, the NPC has to be the currently selected weapon by the player. |
actionprojectile |
True when
a projectile shot using the "shoot" command strikes either a player or
a NPC. |
actionprojectile2 |
This one
is true when a projectile shot using the "shoot" command strikes the
ground (ie didn't hit anything) |
wasthrown | If the NPC was thrown by the player (canbecarried would have to have been set before hand). |
exploded | True when te NPC has been touched by a bomb blast. |
washit | True if the NPC has been hit by the player's sword. Can also be returned true if the variables "hurtdx" and "hurtdy" were used on a NPC using the variables "hearts" a long with the "hitplayer" command. |
wasshot | Returned true if the NPC was hit by an arrow. |
shotbyplayer | True if the NPC was hot by an arrow that the player shot. |
shotbybaddy | This is true if a baddy shot the NPC (one of the archers, or dragon). |
waspelt | A pelt occurs when the NPC was hit by an object thrown at it. |
peltwithbush | If the pelting that occured was done with a bush, this is true. |
peltwithsigh | True when the NPC was pelt with a sign. |
peltwithvase | True if the NPC was pelt with a vase. |
peltwithstone | If the pelting that occcured was done with a stone, this is true. |
peltwithblackstone | Same as above, but a black stone instead. |
peltwithnpc | If the NPC was pelt by another NPC that was thrown at it, this is true. |
leftmousedown | This is true when the left mouse button has been pushed. |
middlemousedown | This returns true when the middle mouse button is pushed down. |
rightmousedown | True when the right mouse button has been pushed. |
mousedown | This is only true while a mouse button is still pushed down. |
mouseup | This is true immediately after the mouse button has been released. |
mousewheel | This returns true when the mouse wheel has been used. |
actionleftmouse | This is set to true when the player has clicked on the NPC with the left mouse button. |
actionmiddlemouse | True when the NPC is clicked on with the middle mouse button. |
actionrightmouse | Returns as true when the right mouse button was used to click on the NPC. |
actiondoublemouse | This is true when the NPC has been "double-clicked". |
keypressed |
True when
any standard key has been pushed |
keydown(key) |
True when one of these keys have been pushed: (0..10: up,left,down,right,S,A,D,M,tab,Q,P) |
keydown2 (character,ignorecase) |
Checks for the character to be pushed. |