The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Code Library => Topic started by: inktrebuchet on June 12, 2019, 05:16:19 am

Title: Concept/study. Get more out of vars.
Post by: inktrebuchet on June 12, 2019, 05:16:19 am
Like the title suggests, the goal for this piece of code was to save vars usage. Here I've put together the base for a buffer system, it uses 2 or 3 vars to buffer 12 basic button/direction inputs, depending if it’s example 1 or 2. I can't think of too many uses for this but I'm posting it so it's available to anyone looking to get more out of vars. Be sure to check the "Notes" section and here's a clip of DisplayToClipboard in action. https://i.imgur.com/hRA0vLZ.mp4

Also, since you're here to get more out of vars, you may want to check out http://mugenguild.com/forum/msg.1482141 too.

Thanks to JustNoPoint and Jesuszilla for answering any questions I had about buffer systems.

Example 1, This is a helper that uses keyctrl.
This code allows for 'Buff.time' < 22 to store 4 buttons in 1 var. This example shows all basic button presses.
Spoiler, click to toggle visibilty

Example 2, This is a helper that uses keyctrl.
This code allows for 'Buff.time' < 10 to store 8 buttons in 1 var. This example shows all the directional button presses.
Spoiler, click to toggle visibilty

Title: Re: Concept/study. Get more out of vars.
Post by: inktrebuchet on August 03, 2019, 07:49:13 pm
Updated with a second example. The second example reduces the amount of vars used with explanation.