Creation/Dev/Script/Client/TServerLevel: Difference between revisions

From Graal Bible
mNo edit summary
 
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<pre>
[[Category:Scripting Reference]]
  TServerLevel (TGraalVar):
Inherits [[Creation/Dev/Script/Client/TGraalVar|TGraalVar]]
    compsdead - boolean (read only)
=Variables=
    isnopkzone - boolean (read only)
{| border="1" cellpadding="2" width="100%"
    issparringzone - boolean (read only)
| '''Name'''
    nopkzone - boolean (read only) - same like 'isnopkzone'
| '''Type'''
    findareanpcs(float, float, float, float) - returns object - returns an array of all npcs at the specified rectangle (x,y,width,height)
| '''Description'''
    hitcompu(int, int, float, float)
|-
    putbomb(int, float, float)
| compsdead
    putcomp(str, float, float)
| boolean (read only)
    putexplosion(int, float, float)
| Returns true if there is no living baddy in the level.
    putexplosion2(int, int, float, float)
|-
    puthorse(str, float, float)
| height
    putnewcomp(str, float, float, str, int)
| integer (read only)
    reflectarrow(int)
|
    removearrow(int)
|-
    removebomb(int)
| isnopkzone
    removecompus()
| boolean (read only)
    removeexplo(int)
| Whether players may kill each other in this level. (noplayerkilling() function used)
    removehorse(int)
|-
    removeitem(int)
| issparringzone
    setz(int, int, int, int, float, float, float, float)
| boolean (read only)
    shoot(float, float, float, float, float, float, str, str) - shoots a projectile with x,y,z,angle,zangle,strength,ani,aniparams
|
    testbomb(float, float) - returns integer
|-
    testexplo(float, float) - returns integer
| nopkzone
    testhorse(float, float) - returns integer
| boolean (read only)
    testitem(float, float) - returns integer
| See ''isnopkzone''
    testnpc(float, float) - returns integer
|-
    testsign(float, float) - returns integer
| tilelayercount
    tiletype(float, float) - returns integer
| integer (read only)
</pre>
|
|}
 
=Functions=
 
{| border="1" cellpadding="2" width="100%"
| '''Name'''
| '''Return Type'''
| '''Description'''
|-
| findareanpcs(float x, float y, float width, float height)
| object
| Returns an array of all npcs within the specified area.
|-
| hitcompu(int id, int power, float fromx, float fromy)
|
| Hurts a baddy.
|-
| putbomb(int power, float x, float y)
|
| Places a bomb on the level. (power of 0 - bomb, 1 - superbomb, 2 - joltbomb)
|-
| putcomp(str baddyname, float x, float y)
|
| Places a baddy on the level.
Baddy Names:
* graysoldier
* bluesoldier
* redsoldier
* shootingsoldier
* swampsoldier
* frog
* octopus (spider)
* goldenwarrior
* lizardon
* dragon
|-
| putexplosion(int power, float x, float y)
|
|
|-
| putexplosion2(int power, int radius, float x, float y)
|
|
|-
| puthorse(str image, float x, float y)
|
|
|-
| putnewcomp(str baddyname, float x, float y, str imgname, int power)
|
|
|-
| reflectarrow(int id)
|
|
|-
| removebomb(int id)
|
|
|-
| removecompus()
|
|
|-
| removeexplo(int id)
|
|
|-
| removehorse(int id)
|
|
|-
| removeitem(int id)
|
|
|-
| setz(int, int, int, int, float, float, float, float)
|
|
|-
| shoot(float x, float y, float z, float angle, float zangle, float strength, str ani, str aniparams)
|
| shoots a projectile
|-
| testbomb(float x, float y)
| integer
|
|-
| testexplo(float x, float y)
| integer
|
|-
| testhorse(float x, float y)
| integer
|
|-
| testitem(float x, float y)
| integer
|
|-
| testnpc(float x, float y)
| integer
|
|-
| testsign(float x, float y)
| integer
|
|-
| tiletype(float x, float y)
| integer
|
|}

Latest revision as of 10:25, 16 February 2010

Inherits TGraalVar

Variables

Name Type Description
compsdead boolean (read only) Returns true if there is no living baddy in the level.
height integer (read only)
isnopkzone boolean (read only) Whether players may kill each other in this level. (noplayerkilling() function used)
issparringzone boolean (read only)
nopkzone boolean (read only) See isnopkzone
tilelayercount integer (read only)

Functions

Name Return Type Description
findareanpcs(float x, float y, float width, float height) object Returns an array of all npcs within the specified area.
hitcompu(int id, int power, float fromx, float fromy) Hurts a baddy.
putbomb(int power, float x, float y) Places a bomb on the level. (power of 0 - bomb, 1 - superbomb, 2 - joltbomb)
putcomp(str baddyname, float x, float y) Places a baddy on the level.

Baddy Names:

  • graysoldier
  • bluesoldier
  • redsoldier
  • shootingsoldier
  • swampsoldier
  • frog
  • octopus (spider)
  • goldenwarrior
  • lizardon
  • dragon
putexplosion(int power, float x, float y)
putexplosion2(int power, int radius, float x, float y)
puthorse(str image, float x, float y)
putnewcomp(str baddyname, float x, float y, str imgname, int power)
reflectarrow(int id)
removebomb(int id)
removecompus()
removeexplo(int id)
removehorse(int id)
removeitem(int id)
setz(int, int, int, int, float, float, float, float)
shoot(float x, float y, float z, float angle, float zangle, float strength, str ani, str aniparams) shoots a projectile
testbomb(float x, float y) integer
testexplo(float x, float y) integer
testhorse(float x, float y) integer
testitem(float x, float y) integer
testnpc(float x, float y) integer
testsign(float x, float y) integer
tiletype(float x, float y) integer