Tea-Script functions suggestions

Description: Have any suggestions or new ideas for SMBX-38A? This is a place for you. Good suggestions may appear in future versions of SMBX-38A.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 326
Posts: 702
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 19 Jan 2020, 18:10

Since postimage.cc is no longer available, I'm making this post to update my previous script suggestions. I also like to take the opportunity of slightly change them for better versions. I have been worked a lot in tea-script, and these suggestions cover most of my limitations:

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.
Spoiler
script-cut.png
script-cut.png (1.88 KiB) Viewed 244 times

script.png

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.
Spoiler
autorun.png
autorun.png (2.9 KiB) Viewed 244 times

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:

Actual:
Spoiler
1.png
1.png (1023 Bytes) Viewed 244 times

1b.png
1b.png (792 Bytes) Viewed 244 times

With spcalibrator enabled:
Spoiler
2.png
2.png (974 Bytes) Viewed 244 times

2b.png
2b.png (809 Bytes) Viewed 244 times

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.
Spoiler
blink.gif
blink.gif (27.79 KiB) Viewed 244 times

call screenshake(intensity) Original Topic
A function that lets us produce a highly customizable tremor effect.

Examples:
Spoiler
Intensity 2:
intensity 2.gif


Intensity 2.5:
intensity 2.5.gif


Intensity 5:
intensity 5.gif

doKeyPress() (new)
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.
Spoiler
table.PNG
table.PNG (10.67 KiB) Viewed 244 times

Example of usage:
Spoiler

Code: Select all

dim i as integer

call doKeyPress(-13) 'DOWN key
do
    i += 1
    if i > 10 then
        doKeypress(-13) = 0
    end if
    call sleep(1)
loop

It would keep holding down for the first 10 frames, and then release it.

block(#).invisible (new)
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.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Eri7 M
Viscount
Viscount
Avatar
Eri7 M
Viscount
Viscount
Age: 18
Reputation: 104
Posts: 376
Joined: 19 Dec 2016
Location: Germany, Bonn
Youtube channel URL Twitter

Post #2by Eri7 » 20 Jan 2020, 1:28

Hopefully we get these implemented!
Join the discord server about Nova Projects.
Image

Image


Return to “Ideas & Suggestions”

Who is online (over the past 5 minutes)

Users browsing this forum: 2 guests