1
SFML projects / Re: Bullet Hell Game
« on: April 30, 2020, 05:29:49 pm »
Update:
A new feature has been added to the game: Actions
Actions are a series of commands that are bound to certain keys. They can be used to automatically execute commands for cheats, or to help automate tasks for mod development. Of course, to be used to require cheats to be enabled. Actions are define in config.lua
In config.lua, to use actions you must define a table named "actions". Inside the actions table, to define an action, define a table with the action name. The table must have two members, one for the keys that the action is bound to, and the other for the commands to be executed when the action is run. For example, an actions table might look like this:
The keys table is an array, where each key in the array must be pressed to execute the action. The commands table is an array of command strings to run, which will be run in order when the action is run. The name of the action for now has no purpose, and you can name your actions whatever you want. However, I do have plans for it in the future.
A new feature has been added to the game: Actions
Actions are a series of commands that are bound to certain keys. They can be used to automatically execute commands for cheats, or to help automate tasks for mod development. Of course, to be used to require cheats to be enabled. Actions are define in config.lua
In config.lua, to use actions you must define a table named "actions". Inside the actions table, to define an action, define a table with the action name. The table must have two members, one for the keys that the action is bound to, and the other for the commands to be executed when the action is run. For example, an actions table might look like this:
actions = {
advance = {
keys = {Keys.RShift, Keys.A},
commands = {"set time 0.01", "set position 200 0"}
}
accelerate = {
keys = {Keys.RShift, Keys.E},
commands = {"set invincible true", "set tps 500"}
}
decelerate = {
keys = {Keys.RShift, Keys.R},
commands = {"set invincible false", "set tps 60"}
}
invincableon = {
keys = {Keys.RShift, Keys.I},
commands = {"set invincible true"}
}
invincableoff = {
keys = {Keys.RShift, Keys.O},
commands = {"set invincible false"}
}
}
advance = {
keys = {Keys.RShift, Keys.A},
commands = {"set time 0.01", "set position 200 0"}
}
accelerate = {
keys = {Keys.RShift, Keys.E},
commands = {"set invincible true", "set tps 500"}
}
decelerate = {
keys = {Keys.RShift, Keys.R},
commands = {"set invincible false", "set tps 60"}
}
invincableon = {
keys = {Keys.RShift, Keys.I},
commands = {"set invincible true"}
}
invincableoff = {
keys = {Keys.RShift, Keys.O},
commands = {"set invincible false"}
}
}
The keys table is an array, where each key in the array must be pressed to execute the action. The commands table is an array of command strings to run, which will be run in order when the action is run. The name of the action for now has no purpose, and you can name your actions whatever you want. However, I do have plans for it in the future.