Autorun scripts Original topic
Events can already be called when the level is initialized, so it would be great if script can do it as well.
autorun_e(ID) Original topic
My suggestion remains the same. A function that returns true for a frame when the given autorun event (ID) was called.
char(#).spcalibrator Original topic
This is an update of sys(enablePlayerSpecialCalibrator). The name was too long and having a system variable for each player wouldn't be optimal. Instead, I thought it would fit better as a character property. This function moves the hitboxes to the players to the center of each sprite, like this:
With spcalibrator enabled:
It follows this same formula for all characters. It would be extremely useful for making power-ups, allowing us to work with more space.
char(#).blinking Original topic
I want to make a little update to my suggestion. Make this value return true every time the player is invisible (when got hurt or growth). Before I suggested also make it return -1 when the player was not able to move, but it is unnecessary. The reason why I'm suggesting this is because when I make power-ups or custom mechanics, I often find a challenge make the custom sprites blink in the same way the player does when it gets hurt/grows.
When the blinking animation starts, it's a bit random so it's impossible to perfectly synchronize it. Plus the blinking patron variates a lot, it's different when the player gets an special power-up (like leaf), when it grows normally, when it gets hurt and when it loses a mountable or a hat. This requires a lot of code that could be simplified by this property.
call screenshake(intensity) Original Topic
A function that lets us produce a highly customizable tremor effect.
- Intensity 2:
Currently the only thing we can't do in events, but can do in scripts, is to force certain keys to be pressed. I suggest the function doKeyPress(Key) to force a key to be pressed. If it's set to 1, it will hold the given key and if it's 0, it will release it. The values can keep the same as KeyPress, except it doesn't need to add support for ASCII values.
Example of usage:
Code: Select all
dim i as integer
call doKeyPress(-13) 'DOWN key
i += 1
if i > 10 then
doKeypress(-13) = 0
It would keep holding down for the first 10 frames, and then release it.
As far I know, there's no way to know if a block is invisible. I suggest implementing the property "invisible" to know if it was set to.