Simple CMD Buffer

Simple CMD Buffer v1.0

What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
I made sure my file(s) follow the Submissions Guidelines
  1. Yes
I named my file(s) correctly (see Filename Conventions)
  1. Yes
Have you ever tried porting a map from an old version of SRB2 that used SOC scripts, only to be met with this?

WARNING: Command 'wait' cannot be run from a script.


Well, have I got a solution for you!

Introducing...

MIDIMan's Simple CMD Buffer!
This addon provides a rough implementation of SRB2's command buffer in Lua! Instead of relying on "wait" for delaying console commands like "cecho" and "quit", this script uses its own timer to delay commands. It has the added benefit of not freezing the chat or other commonly used console commands (skin, color, etc.).
The PK3 includes two maps with three floor pads that each run a separate "script". The first map uses the UDMF format, while the second map uses the Binary format. The Lua script contains details on how the buffer system works as well as how to set up your own scripts.
To use it in a map, add a control linedef with type 443 and use "CMDSCRIPT" for the function name. For Binary (Zone Builder) maps, the script number is defined by the control linedef's front X offset. For UDMF (Ultimate Zone Builder) maps, the script number is determined by Argument 1 (arg0 in code).

For an example of this system used in an actual level, check out House, a port of an old 2.0/2.1 map that originally used SOC scripts.

Special thanks to the SRB2 Wiki and Discord server for being great modding resources!
Author
"MIDIMan"
Downloads
50
Views
435
Extension type
pk3
File size
5.6 KB
MD5 Hash
7fd42a467cbc4e04d01a481679000163
First release
Last update

More resources from "MIDIMan"

Share this resource

Back
Top