• Do not use Works in Progress as a way of avoiding the releases system! Works in Progress can be used for sharing early betas and for getting suggestions for improvement. Releases of finished content are not allowed in this forum! If you would like to submit a finished addon, click here for instructions on how to do so.

Rapidgame7 tries to Lua

Status
Not open for further replies.

amperbee

thunderdome denizen
I just made up a verb.
I made some scripts that aren't finished yet, because of bugs, little exploits, or because it needs even more eye candy.

Jetpack
IYr5j5y.gif
xsYGwX7.gif

It's just a simple script that originally was a monetary system where you could buy stuff and pay people, but transformed into a jetpack thing.
You can even give fuel to other people, set fuel if you are admin, and even read a little introduction along with a "how to use".
Fun fact: If you are upside down, this makes you fly downwards.

I could submit it as a release, but still needs some bugfixes and features.
Xg4cYRN.gif
BOrDo1B.gif

I felt like something was missing from the game when I started pressing people to finish the levels quicker. So there it is, a reason to press people to win and stop hanging around.
You set a time, you re-enter GFZ1, and you have that much time to finish the entire game. The time left stays between levels.
Oh, and the game vibrates!

Also, it removes your entire HUD, doesn't show the title card for the level, forces you to not have more than 1 live, and gives you a timer that ticks down.

Demonstration in three videos:
Old version:


Newest version:


(I won't add any more videos here: If I have to add another, I will just replace the oldest video as to not clutter the entire section)

There are a few problems, however:
- The camera goes behind the player and blocks the view for a frame
- Apart from blocking the view, when it is not, a flashing Sonic is annoying.
- If that Sonic uses a shield, the area being blocked will be greater.
- Needs more visual effects

In the newest version, I've changed the string with another one (shorter), and replaced the "padded number" function with another that was designed to write strings. It looks nice on numbers, and also it's more customizable.
Also, when there are 60, 30 and 10 seconds left, the quake tends to be stronger.
6eeKM99.gif
GGxUWUV.gif

I already released this, I just wanted to brag about it.
It's just what the title says. You have permanent weapons. They never get removed, they don't use rings, and you can use them in co-op and singleplayer.

I am going to fix it and use a more clean code, and add more features, but first I want to finish some projects.

Teleport
You type "tp" and a number, and you're instantly teleported to the player using that player number.

Ultimate
Simulates ultimate mode, except it doesn't remove objects yet.
You can choose to toggle the rings, lives and shields, and if any of these are disabled, the script prevents you from getting a disabled object.
As a visual cue, the respective part of the HUD gets removed. Unless we are talking about shields.

Sprint
A script that was designed to be used alongside rush!
You have to hold "Custom button 1" and it will give you more speed, more jump, and you will be able to run over water.
There is a counter that goes from 100 to 0, showing you how much you can sprint. You don't want to get tired.
However it is limited, and you have to let it recharge completely to be able to use it again.
You cannot just tap repeatedly the button, because as soon as you release the button, you get tired instantly and you must let it recharge, so you should use it only if you have to.
I'll provide screenshots shortly, and as soon as I do, I will add another section right below rush.

I'm not very experienced with Lua.
 
Last edited:
hook.drawString(x, y, player.minutesleft .. ":" .. player.secondsleft)

I hope this helps!

Rush mode sounds fun, for someone like me who adores speed-runs. If you need a moderate generalization on how much time it takes to get through each level, you can check http://records.srb2.org but don't make this too hard, or else your script will frustrate players far more than usher them to the end sign. Quite obviously, the further from the end sign you are, the more you've been sitting around, and the more this effects you.

You could also enable rush mode at the start of a level and challenge your friends to beating the stage quick, and see who survives. DSZ1 In 1:20... yeah sure we can all do that..
 
Last edited:
v.drawString doesn't give you the type of numbers or colon that Rapidgame7 would like, I should point out. That said, the name of the graphic for the colon used in the original "TIME" hud in question is "SBOCOLON".
 
Last edited:
Oh, thanks then. I'm relatively new to this whole Lua ordeal, but I learned something new from that. Kind of funny how those numbers are their own images and what not. Does that mean we can create custom title cards using the title card letters? If so, you could potentially make an in-level title card like Sonic the Hedgehog 3 does.

Back on topic though, Rush mode would be unfriendly to new players who would rather explore the levels, which is what most new players join to do; to join a network game and actually be in a server that's patient enough to let them play at their own pace.
 
Last edited:
If you need a moderate generalization on how much time it takes to get through each level, you can check http://records.srb2.org
Much obliged.
I never knew that webpage was around.

You could also enable rush mode at the start of a level and challenge your friends to beating the stage quick, and see who survives.
I will add a separate function that makes a timer for each level instead of a single timer for the entire game, if that's what you're suggesting.

Back on topic though, Rush mode would be unfriendly to new players who would rather explore the levels, which is what most new players join to do; to join a network game and actually be in a server that's patient enough to let them play at their own pace.
Well, I'm pretty sure that the server host will reflect the script on the server name, or maybe put a giant number for the timer to give enough time to newcomers. That is, if the host uses the script.



Now talking about the main post, the which I need to update shortly, I've just changed some stuff on the rush script: How it looks, a bit on how it works, and some commands.
I've added a new video on the rush section.
Also, I've made a separate script that should go alongside rush. I forgot to take screenshots of it, so as soon as I have screenshots, I will post them.
 
Oh, thanks then. I'm relatively new to this whole Lua ordeal, but I learned something new from that. Kind of funny how those numbers are their own images and what not. Does that mean we can create custom title cards using the title card letters? If so, you could potentially make an in-level title card like Sonic the Hedgehog 3 does.

Every individual character (letter, number, or other symbol) for most fonts in SRB2 is a separate graphic, including the ones used for the title cards. So yes, in theory you can.

Sadly it'd be quite a bit of work to do that in practice; none of the functions SRB2's Lua provides would allow you to instantly create a string out of the title card letter graphics, so one would have to code their own functions to do just that.

That said, this small section of a page I created years ago would be of use for reference regards the graphic names: https://wiki.srb2.org/wiki/List of graphics#Level_title_font
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top