Difference between revisions of "Sysval (TeaScript)"

From PGE Wiki
Jump to navigation Jump to search
(Created page with "==Sysval()== Sysval is a function in TeaScript.vbs that allows you to read or write system variables. To read the value of a sysval do: <syntaxhighlight lang="vb"> sysval(na...")
 
Line 1: Line 1:
==Sysval()==
 
 
Sysval is a function in TeaScript.vbs that allows you to read or write system variables.  
 
Sysval is a function in TeaScript.vbs that allows you to read or write system variables.  
  

Revision as of 20:18, 16 April 2017

Sysval is a function in TeaScript.vbs that allows you to read or write system variables.

To read the value of a sysval do:

sysval(name)

This will return the value of the sysval used. Note that 'name' is not case-sensitive.


When using a sysval that is writeable do:

sysval(name) = value

to change the value of the sysval.


Name Description
NCount Read Only

The number of NPCs in the level.

BCount Read Only

The number of blocks in the level.

BGOCount Read Only

The number of background objects in the level.

WCount Read Only

The number of warps in the level.

LCount Read Only

The number of liquids in the level.

ScrSplitstyle Read Only

The status of the camera's split mainly used for 2 player mode.

0: The camera is not split or 1 player mode is on.

1: Player 1 is on the top and player 2 in on the bottom.

2: Player 1 is on the bottom and player 2 in on the top.

3: Player 1 is on the left and player 2 in on the right.

4: Player 1 is on the right and player 2 in on the left.

Player1scrX Read Only

The camera's top left X-scene coordinate of player 1.

Player1scrY Read Only

The camera's top left Y-scene coordinate of player 1.

Player2scrX Read Only

The camera's top left X-scene coordinate of player 2.

Player2scrY Read Only

The camera's top left Y-scene coordinate of player 2.

GameMode Read Only

The current game mode.

0: 1 player mode.

1: 2 player mode.

2: Battle mode.

Playerhealth Read and Write

The current number of 1-ups collected.

CoinCount Read and Write

The current number of coins collected.

Score Read and Write

The current score.

StarCount Read Only

The current number of collected stars.

Starcoincount Read Only

The current number of collected star coins.

WldInvCount Read Only

The current number of items in the world map inventory.

BPlayer1Health Read Only

The current number of 1-ups for player 1 in battle mode.

BPlayer2Health Read Only

The current number of 1-ups for player 2 in battle mode.

EnableLighting Write Only

The change the light system.

0: Turn off the light system.

1: Turn on the light system.

Disablesave Write Only

To change the player's ability to save.

1: Disable the player's ability to save.

0: Enable the player's ability to save.

Param1 Read and Write

The first parameter transmitted when called.

Param2 Read and Write

The second parameter transmitted when called.

Param3 Read and Write

The third parameter transmitted when called.