Difference between revisions of "NPC (TeaScript)"
Jump to navigation
Jump to search
Void-the-Bat (talk | contribs) (Added hidden script features. Further testing needed for langle and stimer.) |
Void-the-Bat (talk | contribs) (Added types) |
||
Line 14: | Line 14: | ||
{| class="wikitable" border="0" | {| class="wikitable" border="0" | ||
!Name | !Name | ||
+ | !Type | ||
!Description | !Description | ||
|- | |- | ||
|<code>X</code> | |<code>X</code> | ||
+ | |R&W | ||
|The X coordinate of the NPC. | |The X coordinate of the NPC. | ||
|- | |- | ||
|<code>Y</code> | |<code>Y</code> | ||
+ | |R&W | ||
|The Y coordinate of the NPC. | |The Y coordinate of the NPC. | ||
|- | |- | ||
|<code>prX</code> | |<code>prX</code> | ||
+ | |R&W | ||
|The X coordinate of the original position's NPC. | |The X coordinate of the original position's NPC. | ||
|- | |- | ||
|<code>prY</code> | |<code>prY</code> | ||
+ | |R&W | ||
|The Y coordinate of the original position's NPC. | |The Y coordinate of the original position's NPC. | ||
|- | |- | ||
|<code>Xsp</code> | |<code>Xsp</code> | ||
+ | |R&W | ||
|The X speed of the NPC. | |The X speed of the NPC. | ||
|- | |- | ||
|<code>Ysp</code> | |<code>Ysp</code> | ||
+ | |R&W | ||
|The Y speed of the NPC. | |The Y speed of the NPC. | ||
|- | |- | ||
|<code>ExtX</code> | |<code>ExtX</code> | ||
+ | |R&W | ||
|The X placement of the GFX expansion. | |The X placement of the GFX expansion. | ||
|- | |- | ||
|<code>ExtY</code> | |<code>ExtY</code> | ||
+ | |R&W | ||
|The Y placement of the GFX expansion. | |The Y placement of the GFX expansion. | ||
|- | |- | ||
|<code>Facing</code> | |<code>Facing</code> | ||
+ | |R&W | ||
|The direction of the NPC. | |The direction of the NPC. | ||
|- | |- | ||
|<code>ForeColor</code> | |<code>ForeColor</code> | ||
+ | |R&W | ||
|The color of the NPC. | |The color of the NPC. | ||
|- | |- | ||
Line 50: | Line 61: | ||
<code>ivalc</code> | <code>ivalc</code> | ||
+ | |R&W | ||
|Determines the behavior of an NPC. [https://wohlsoft.ru/forum/viewtopic.php?f=66&t=3191 More info on how it works here.] | |Determines the behavior of an NPC. [https://wohlsoft.ru/forum/viewtopic.php?f=66&t=3191 More info on how it works here.] | ||
|- | |- | ||
|haswing | |haswing | ||
+ | |R&W | ||
|Determines if the NPC has the wing special type and what type of wing movement it has. | |Determines if the NPC has the wing special type and what type of wing movement it has. | ||
0 = None | 0 = None | ||
Line 73: | Line 86: | ||
|- | |- | ||
|id | |id | ||
+ | |R&W | ||
|The ID of the NPC. | |The ID of the NPC. | ||
|- | |- | ||
|addvx | |addvx | ||
+ | |? | ||
|The x-axis platform speed of the NPC. | |The x-axis platform speed of the NPC. | ||
|- | |- | ||
|addvy | |addvy | ||
+ | |? | ||
|The y-axis platform speed of the NPC. | |The y-axis platform speed of the NPC. | ||
|- | |- | ||
|friendly | |friendly | ||
+ | |R&W | ||
|Determines if the NPC is marked as friendly or not. | |Determines if the NPC is marked as friendly or not. | ||
|- | |- | ||
|nomove | |nomove | ||
+ | |R&W | ||
|Determines if the NPC's "Don't Move" flag is enabled. | |Determines if the NPC's "Don't Move" flag is enabled. | ||
|- | |- | ||
|curframe | |curframe | ||
+ | |R&W | ||
|The current frame of the NPC. | |The current frame of the NPC. | ||
|- | |- | ||
|health | |health | ||
+ | |R&W | ||
|The current health of the NPC. | |The current health of the NPC. | ||
|- | |- | ||
|advSet | |advSet | ||
+ | |R&W | ||
|Determines the advanced value of the NPC. | |Determines the advanced value of the NPC. | ||
|- | |- | ||
|permID | |permID | ||
+ | |? | ||
|The permanaent ID of the NPC. | |The permanaent ID of the NPC. | ||
|- | |- | ||
|alive | |alive | ||
+ | |R&W | ||
|Checks for if the NPC is alive or active. | |Checks for if the NPC is alive or active. | ||
|- | |- | ||
|bkupx | |bkupx | ||
+ | |? | ||
|The backup X position of the NPC. | |The backup X position of the NPC. | ||
|- | |- | ||
|bkupy | |bkupy | ||
+ | |? | ||
|The backup Y position of the NPC. | |The backup Y position of the NPC. | ||
|- | |- | ||
|stand | |stand | ||
+ | |R&W | ||
|Determines if the NPC is affected by gravity. (1: off, 0: on) | |Determines if the NPC is affected by gravity. (1: off, 0: on) | ||
|- | |- | ||
|curtime | |curtime | ||
+ | |? | ||
|The individual frame timer of the NPC. Counts from 1 to 8 and then resets. | |The individual frame timer of the NPC. Counts from 1 to 8 and then resets. | ||
|- | |- | ||
|scount | |scount | ||
+ | |? | ||
|This value will be set to 1 if another NPC is colliding with the current. | |This value will be set to 1 if another NPC is colliding with the current. | ||
|- | |- | ||
|dtcplayer | |dtcplayer | ||
+ | |R&W | ||
|Determines if the NPC is able to detect players. (1: off, 0: on) | |Determines if the NPC is able to detect players. (1: off, 0: on) | ||
|- | |- | ||
|dtcliquid | |dtcliquid | ||
+ | |R&W | ||
|Determines if the NPC is able to detect liquids or not. | |Determines if the NPC is able to detect liquids or not. | ||
|- | |- | ||
|dtcself | |dtcself | ||
+ | |R&W | ||
|Determines if the NPC is able to detect other NPCs or not. | |Determines if the NPC is able to detect other NPCs or not. | ||
|- | |- | ||
|zpos | |zpos | ||
+ | |R&W | ||
|The z-position of the NPC. | |The z-position of the NPC. | ||
|- | |- | ||
|inwater | |inwater | ||
+ | |? | ||
|Determines if the NPC is using water physics or not. | |Determines if the NPC is using water physics or not. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|extset | |extset | ||
+ | |R&W | ||
|External settings for the NPC. For bubbles and SMW Lakitus, the NPC ID they contain will depend on what this value is set to. | |External settings for the NPC. For bubbles and SMW Lakitus, the NPC ID they contain will depend on what this value is set to. | ||
|- | |- | ||
|target | |target | ||
+ | |R&W | ||
|Determines which player is closest. Primarily used for chasing NPCs. | |Determines which player is closest. Primarily used for chasing NPCs. | ||
|- | |- | ||
|hide | |hide | ||
+ | |R&W | ||
|Hides the NPC if set to 1. | |Hides the NPC if set to 1. | ||
|- | |- | ||
|langle | |langle | ||
+ | |? | ||
|Unknown effect. | |Unknown effect. | ||
|- | |- | ||
|stimer | |stimer | ||
+ | |? | ||
|Unknown effect. | |Unknown effect. | ||
|} | |} |
Revision as of 22:58, 12 February 2020
NPC is a class in TeaScript.vbs that allows you to read/write values of NPCs.
To read the value of NPC
use:
NPC(index).name
To change the value of NPC
use:
NPC(index).name = value
Name | Type | Description |
---|---|---|
X
|
R&W | The X coordinate of the NPC. |
Y
|
R&W | The Y coordinate of the NPC. |
prX
|
R&W | The X coordinate of the original position's NPC. |
prY
|
R&W | The Y coordinate of the original position's NPC. |
Xsp
|
R&W | The X speed of the NPC. |
Ysp
|
R&W | The Y speed of the NPC. |
ExtX
|
R&W | The X placement of the GFX expansion. |
ExtY
|
R&W | The Y placement of the GFX expansion. |
Facing
|
R&W | The direction of the NPC. |
ForeColor
|
R&W | The color of the NPC. |
ivala
|
R&W | Determines the behavior of an NPC. More info on how it works here. |
haswing | R&W | Determines if the NPC has the wing special type and what type of wing movement it has.
0 = None 1 = Jump 2 = Hover Left/Right 3 = Hover Up/Down 4 = Chase 5 = Hover Forward 6 = Lakitu's AI 7 = Controlled by NPC-308 8 = SMW Lines |
id | R&W | The ID of the NPC. |
addvx | ? | The x-axis platform speed of the NPC. |
addvy | ? | The y-axis platform speed of the NPC. |
friendly | R&W | Determines if the NPC is marked as friendly or not. |
nomove | R&W | Determines if the NPC's "Don't Move" flag is enabled. |
curframe | R&W | The current frame of the NPC. |
health | R&W | The current health of the NPC. |
advSet | R&W | Determines the advanced value of the NPC. |
permID | ? | The permanaent ID of the NPC. |
alive | R&W | Checks for if the NPC is alive or active. |
bkupx | ? | The backup X position of the NPC. |
bkupy | ? | The backup Y position of the NPC. |
stand | R&W | Determines if the NPC is affected by gravity. (1: off, 0: on) |
curtime | ? | The individual frame timer of the NPC. Counts from 1 to 8 and then resets. |
scount | ? | This value will be set to 1 if another NPC is colliding with the current. |
dtcplayer | R&W | Determines if the NPC is able to detect players. (1: off, 0: on) |
dtcliquid | R&W | Determines if the NPC is able to detect liquids or not. |
dtcself | R&W | Determines if the NPC is able to detect other NPCs or not. |
zpos | R&W | The z-position of the NPC. |
inwater | ? | Determines if the NPC is using water physics or not. |
extset | R&W | External settings for the NPC. For bubbles and SMW Lakitus, the NPC ID they contain will depend on what this value is set to. |
target | R&W | Determines which player is closest. Primarily used for chasing NPCs. |
hide | R&W | Hides the NPC if set to 1. |
langle | ? | Unknown effect. |
stimer | ? | Unknown effect. |