Difference between revisions of "NPC (TeaScript)"

From PGE Wiki
Jump to navigation Jump to search
m
(Added .haswing. Thanks Eri7!)
Line 51: Line 51:
 
<code>ivalc</code>
 
<code>ivalc</code>
 
|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
 +
|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
 
|}
 
|}

Revision as of 04:00, 9 November 2019

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 Description
X The X coordinate of the NPC.
Y The Y coordinate of the NPC.
prX The X coordinate of the original position's NPC.
prY The Y coordinate of the original position's NPC.
Xsp The X speed of the NPC.
Ysp The Y speed of the NPC.
ExtX The X placement of the GFX expansion.
ExtY The Y placement of the GFX expansion.
Facing The direction of the NPC.
ForeColor The color of the NPC.
ivala

ivalb

ivalc

Determines the behavior of an NPC. More info on how it works here.
haswing 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