forked from ShadowMario/FNF-PsychEngine
-
Notifications
You must be signed in to change notification settings - Fork 33
LUA ‐ How 2 Messageboxes
UltimateQuack edited this page Sep 30, 2024
·
1 revision
This may seem like nonsense, but one of its most important uses is debugging code and "breaking the fourth wall" using simple tools.
You can, for example, make a script using an event where when the player dies, a message mocking him appears.
There are several ways of making messageboxes, including:
- Using """pure""" Lua ("Lua and Haxe" method),
- Using external Batchfile/VBS scripts for messageboxes ("Lua and Batchfile" method)
-- from https://github.com/PatoFlamejanteTV/ImaturidadePlusPlus
function onCreatePost()
addHaxeLibrary('Application', 'lime.app')
runHaxeCode([[Application.current.window.alert('Are you sure?', '...');]])
end
:: MessageBox System, by Pato
:: ----------------------------------------------------------------------------------
@echo off
IF EXIST temp.vbs (
del temp.vbs
)
echo x=msgbox("%1" ,%3, "%2") >> temp.vbs
start temp.vbs
echo DEBUG: Message: %1, Title: %2.
:: del temp.vbs
:: message.bat Die ? 48
:: ^ .bat Name ^ ^ ^- Icon and Other Stuff (eg. "48 for Warning Message icon")
:: | |- Title (eg. "...")
:: |- Content/Message/Text (eg. "I-N-F-E-C-T-E-D")
function onCreatePost()
os.execute("cd .. & cd .. & cd TESTS & message.bat Muahahaah ? 48")
end