—» Home
—» Screens
—» Help
—» F.A.Q.
—» Armory
—» Download
Help Home

Tutorials

Weapon Scr. I
Weapon Scr. II

Cmd Reference

All Commands
General
Load
Graphics
HUD
Sounds
Player
Terrain
Projectiles
Particles
Collision
Objects
AI

Commands: general

Legend

X - X is a number
'X' - X is a string (a letter/word/text)
[X=0] - X is an optional parameter with value 0 when omitted (NEVER add [] to your script!)


angledelta(ANGLE A, ANGLE B)

Parameters:
ANGLE A - an angle
ANGLE B - an angle
Returns:
ANGLE DELTA - difference between two angles
Returns the shortest of the two possible differences between the two angles ANGLE A and ANGLE B.
It's either a positive or a negative value depending on the rotation direction.

arealdamage(X, Y, RADIUS, DAMAGE)

Parameters:
X - x coordinate
Y - y coordinate
RADIUS - radius of damage
DAMAGE - maximum damage
Damages all players within RADIUS at the coordinate (X|Y). The maximum damage at the center is defined with DAMAGE.

blood(X, Y, [AMOUNT=5])

Parameters:
X - x coordinate
Y - y coordinate
[AMOUNT=5] - particle amount
Create some blood particles at the (X|Y) coordinate. The amount depends on AMOUNT and the gore settings.

changeturntime(TIME)

Parameters:
TIME - time in seconds
Increases (or decreases in case of negative values) the turn time by TIME in seconds.

endturn()

Ends the current turn and starts the backing time. It's not possible to use or switch the weapon after ending the turn.

getframe()

Returns:
FRAME - frame of this turn
Returns the current frame of this turn. The game runs with 50 FPS. 50 frames = 1 second.

getframesleft()

Returns:
FRAMES LEFT - number of frames left until turn ends
Returns the number of frames which are left in this turn before it ends.

getgravity()

Returns:
GRAVITY - current gravity
Returns the current gravity value.

getmapheight()

Returns:
HEIGHT - map height in pixels
Returns the height of the map in pixels.

getmapwidth()

Returns:
WIDTH - map width in pixels
Returns the width of the map in pixels.

getround()

Returns:
ROUND - current round
Returns the current round. A game starts with round 1. The round is increased when every living character in the game had one turn.

getwatery()

Returns:
Y - y-coordinate where the water starts
Returns the height (y-coordinate) of the water.

The initial water y-coordinate equals getmapheight-10. This is also the highest possible value for the water (=lowest possible water level).

getwind()

Returns:
WIND - current wind speed/direction
Returns the current wind speed and direction.
Positive values indicate that the wind blows rightwards. Negative values stand for wind blowing leftwards.

-0.1 = maximum wind to the left
0.0 = calm (no wind)
+0.1 = maximum wind to the right

keydown(KEY)

Parameters:
KEY - a key ID
Returns:
DOWN - 1 if key is pressed, else 0
Returns 1 if KEY is pressed, else 0.
Valid values for KEY are:
key_up
key_down
key_left
key_right
key_jump
key_backjump
key_attack

print('TEXT')

Parameters:
'TEXT' - a text you want to print
Print a text in the console. The console can be opened with tab.

quake([POWER=15])

Parameters:
[POWER=15] - quake power from 0 to 30
Creates a quake effect. POWER controls the quake strength and duration. Use POWER 0 to stop the quake effect instantly.

Attention: This is just a visual effect. It does not move players or objects.

recoil(STRENGTH)

Parameters:
STRENGTH - recoil strength in pixels
Recoil effect which pushes back the weapon by STRENGTH pixels. This command only takes effect when the weapon is drawn with the command drawinhand.

scroll(X, Y)

Parameters:
X - x coordinate
Y - y coordinate
Scroll the camera to the (X|Y)-coordinate on the map.

useweapon([ALLOW MORE=0])

Parameters:
[ALLOW MORE=0] - allow to use more? 0/1
Uses the current weapon and decreases its amount.
ALLOW MORE defines if you are allowed to use other weapons afterwards (1) or not (0).

watery(Y)

Parameters:
Y - y-coordinate where the water starts
Changes the height (y-coordinate) of the water.

Attention: You have to DECREASE the value to RAISE the water level. INCREASE the value to LOWER the water level!


The initial water y-coordinate equals getmapheight-10. This is also the highest possible value for the water (=lowest possible water level).

wind(WIND)

Parameters:
WIND - wind speed and direction
Sets the wind speed and direction. WIND has to be a floating point value between -0.1 and 0.1

-0.1 = maximum wind to the left
0.0 = calm (no wind)
+0.1 = maximum wind to the right