Difference between revisions of "Warp (TeaScript)"

From PGE Wiki
Jump to navigation Jump to search
m
(Added read/write types and added WarpEvent name.)
Line 11: Line 11:
 
To change the value of <code>Warp</code> use:
 
To change the value of <code>Warp</code> use:
 
<syntaxhighlight lang="vb">
 
<syntaxhighlight lang="vb">
Warp(id).name = vale
+
Warp(id).name = value
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
{| class="wikitable" border="0"
 
{| class="wikitable" border="0"
 
!Name
 
!Name
 +
!Type
 
!Description
 
!Description
 
|-
 
|-
 
|<code>X</code>
 
|<code>X</code>
 +
|R&W
 
|The X-scene coordinate of the warp's entrance.
 
|The X-scene coordinate of the warp's entrance.
 
|-
 
|-
 
|<code>Y</code>
 
|<code>Y</code>
 +
|R&W
 
|The Y-scene coordinate of the warp's entrance.
 
|The Y-scene coordinate of the warp's entrance.
 
|-
 
|-
 
|<code>Ex</code>
 
|<code>Ex</code>
 +
|R&W
 
|The X-scene coordinate of the warp's exit.
 
|The X-scene coordinate of the warp's exit.
 
|-
 
|-
 
|<code>Ey</code>
 
|<code>Ey</code>
 +
|R&W
 
|The Y-scene coordinate of the warp's exit.
 
|The Y-scene coordinate of the warp's exit.
 
|-
 
|-
 
|<code>Xsp</code>
 
|<code>Xsp</code>
|The X-axis speed of the warp.
+
|W
 +
|The X-axis speed of the warp. Also affects entrance effect.
 
|-
 
|-
 
|<code>Ysp</code>
 
|<code>Ysp</code>
|The Y-axis speed of the warp.
+
|W
 +
|The Y-axis speed of the warp. Also affects entrance effect.
 
|-
 
|-
 
|<code>cannon</code>
 
|<code>cannon</code>
 +
|W
 
|The flight duration of the pipe cannon. Use 0 to disable the cannon.
 
|The flight duration of the pipe cannon. Use 0 to disable the cannon.
 
|-
 
|-
 
|<code>StarCnt</code>
 
|<code>StarCnt</code>
 +
|W
 
|The number of stars needed to enter the warp.
 
|The number of stars needed to enter the warp.
 
|-
 
|-
 
|<code>StarMsg</code>
 
|<code>StarMsg</code>
 +
|W
 
|The message shown when the player doesn't have enough stars. Note, this is a string.
 
|The message shown when the player doesn't have enough stars. Note, this is a string.
 
|-
 
|-
 
|<code>Locked</code>
 
|<code>Locked</code>
 +
|W
 
|Should the warp be locked with a key?
 
|Should the warp be locked with a key?
 +
 
*0: No
 
*0: No
  
Line 52: Line 64:
 
|-
 
|-
 
|<code>Bomb</code>
 
|<code>Bomb</code>
|Should the warp be locked with a bomb?
+
|W
 +
|Should the warp be hit by a bomb before being allowed to enter?
 +
 
 
*0: No
 
*0: No
  
Line 58: Line 72:
 
|-
 
|-
 
|<code>NoYoshi</code>
 
|<code>NoYoshi</code>
 +
|W
 
|Should Mounts be allowed to pass through the warp?
 
|Should Mounts be allowed to pass through the warp?
 +
 
*0: Yes
 
*0: Yes
  
Line 64: Line 80:
 
|-
 
|-
 
|<code>CanPick</code>
 
|<code>CanPick</code>
 +
|W
 
|Should items be allowed to pass through the warp?
 
|Should items be allowed to pass through the warp?
 +
 
*0: No
 
*0: No
  
Line 70: Line 88:
 
|-
 
|-
 
|<code>Mini</code>
 
|<code>Mini</code>
 +
|W
 
|Should the warp only be accessed in mini form?
 
|Should the warp only be accessed in mini form?
 +
 
*0 : No
 
*0 : No
  
 
*1: Yes
 
*1: Yes
 +
|-
 +
|WarpEvent
 +
|W
 +
|The event/script that should be called when entering the warp.
 
|}
 
|}

Revision as of 20:57, 23 March 2020

Warp is a class in TeaScript.vbs that allows you to read/write values for warps.

To read the value of Warp use:

Warp(id).name

id stands for the warp index (as seen in the editor). Note: the name is not case sensitive.


To change the value of Warp use:

Warp(id).name = value
Name Type Description
X R&W The X-scene coordinate of the warp's entrance.
Y R&W The Y-scene coordinate of the warp's entrance.
Ex R&W The X-scene coordinate of the warp's exit.
Ey R&W The Y-scene coordinate of the warp's exit.
Xsp W The X-axis speed of the warp. Also affects entrance effect.
Ysp W The Y-axis speed of the warp. Also affects entrance effect.
cannon W The flight duration of the pipe cannon. Use 0 to disable the cannon.
StarCnt W The number of stars needed to enter the warp.
StarMsg W The message shown when the player doesn't have enough stars. Note, this is a string.
Locked W Should the warp be locked with a key?
  • 0: No
  • 1: Yes
Bomb W Should the warp be hit by a bomb before being allowed to enter?
  • 0: No
  • 1: Yes
NoYoshi W Should Mounts be allowed to pass through the warp?
  • 0: Yes
  • 1: No
CanPick W Should items be allowed to pass through the warp?
  • 0: No
  • 1: Yes
Mini W Should the warp only be accessed in mini form?
  • 0 : No
  • 1: Yes
WarpEvent W The event/script that should be called when entering the warp.