- player1state: To know the current state of the player-1. It's a read-only variable and can have the following values:
0: Player is alive
1: Player is dead
-1: player is spawning (in two-player mode).
(I know there's an auto-run event but it would be very convenient if there's a way to detect if the player is dead through scripts only, this would be specially useful for custom NPCs that chases the player, or that draws images syncronized with them.)
- player2state: same as above but with player-2.
- player1gravity: disables the gravity of the player-1. (So that we're able to completely customize the gravity and avoid colission errors.)
- player2gravity: disables the gravity of the player-2
- wplayerspeed: Stands for the speed the player will move in world map.
- player1uwater: is player-1 underwater?
- player2uwater: is player-2 underwater?
This one is not really that important as the others so I've put it on a spoiler tag.
- I do think it's a good idea modify Yoshi in some way, because we could make completely custom scripts with Yoshi, because with scripts we can only detect is the player is mounting Yoshi, but we can't modify anything related to him aside from the NPC it has in the mouth. (I tried to do a flutter jump and I did, but I had a hard time modifying frames.) So please don't pay much attention to this.
Yoshi(id).property ~ It would work like a custom NPC, with the posibility of rewritte his behaviour or execute it in parallel. To make this posible I thought on a special .txt file named Yoshi. In there you can type the script it'll run, with double ## meaning parallel execution.
ID: Stands for the character ID, so Yoshi(1) would mean the Yoshi that is mounting the player-1.
.x: X position
.y: Y position
.xsp: X speed
.ysp: Y speed
.status (0: normal status, no mounting ~ 1: player is mounting him ~ 2: is running away) [ReadOnly]
.curframe (current frame, 1-7 stands for the body, 8-13 stands for the head)
.facing (facing direction)
.tonguelength (tongue length in pixels)
.tongueix (tongue initial position)
.tongueiy (tongue final position)
- jmpaccel: if set to 1, the player won't be able to gain high while jumping, meaning the jump will me inmediately cancelled (for example, like the mini-goombas).
This jumping acceleration is a problem, it won't let us modify the vertical speed while it happens, meaning make a double-jump is very unnacurate since we need to wait until player stop gains high. I wanted to make a bumper but this problem didn't let me doing the upside bounce properly.
- hovertailtimer: like flytimer, it stands for the time the player is available to hover with the Raccoon/Tanooki suit.
- maxspeed: stands for the maximum x speed the player is able to reach.
- maxgravity: the maximum y speed (gravity) the player is able to reach.
- earthquake(value) To produce an earthquake. Value means the intensity. It would not affect any object unlike POW or tremor, only the camera.
- KeyInput(code): It'll let us make a keyinput false individually, for example:
Code: Select all
if KeyPress(-17) then
KeyInput(-17) = false (or zero)
- printtext(text, xpos, ypos)
To print a text quickly using SMW hardcoded font. It's relative to the screen system and would work for quick testing purposes and messages, without having to set a new font.
- offscreen(Double/Bool): stands for whatever is the npc will dissapear off-screen or not. Suggested values:
1: disappear only horizontally
2: disappear only vertically
3: don't disappear at all
-1: is ready to disappear as soon as it goes off-screen
stands for whatever if the npc will reset its variables if goes off-screen
- slopedtc (ReadOnly)
Slope detect. Turns 1 if the npc is stand in a slope
- Width (ReadOnly)
Stands for the current width of the NPC. (Useful for making custom NPCs that may be changed by other users.)
- Height (ReadOnly)
Stands for the current height of the NPC.
- Keypress: When the keyboard is locked through events, the game won't recognize any keypress input. Can you please make this run even is the keyboard is disabled? This would let us highly customize characters.
- Create new local variables from the script system.
- A new type of variable that won't reset ever. Its value can be only modified through scripts, but its visible in the variable window after the script has loaded it. This variable could be used for example, to make an attempt counter for a level. This variable could be like a local one but with a reserved name.
- A way to execute an script when the level start without trigger it.
- Atan2 functions
- Improve the bitmap x-positions system. It doesn't matter what value of Z-position I use, bitmap will always draw in font of players, backgrounds, blocks and npcs. I wish by default the bitmaps have a NPC-like Z-position and the higher is set the higher priority it'll have.