How to make universal commands outside of the commands tab?
Local_Redditor
04 Sept 2021, 04:26I know the 'Commands' object list thingy can do that, but I'll probably make a lot of commands for this game, and might need some sorting for these commands. Can I make some of those universal commands outside of the commands tab?
Edit: Also, can I make multiple of those Commands list by myself?
Deckrect
04 Sept 2021, 11:00Yes, it is. There is a place at left hand saying "Commands" which lists every command not 'core' to Quest, i.e. all the commands you include by yourself. I know that commands may be a little tricky because they shall never clash agains these core commands in Quest. There is a tutorial about creating commands. Unfortunately this is the best I can do for you, as I know very little about it.
Local_Redditor
04 Sept 2021, 15:46Well, do you think you it's possible to make multiple of those Commands list things on the left object tree?
mrangel
04 Sept 2021, 23:02To work globally, commands have to have their parent
attribute set to null
, in which case they'll be in the commands list in the editor.
If you want to organise them, you could create 'rooms' to put them in, and then move them from there when the game is actually running. For example, you could make a room called "custom commands" which contains other rooms like "crafting commands", "combat commands", and so on, with those rooms containing the actual commands.
Then in your start script you would have something like:
foreach (cmd, AllCommands()) {
if (Contains (custom commands, cmd)) {
cmd.parent = null
}
}
destroy ("custom commands")
This means you can use rooms to organise them in the editor, while they act during the game like they're in the usual place.
Deckrect
05 Sept 2021, 11:12Yes, yes. You can do any number of Commands. If you create a command with the same name of a built-in command, the game uses your new version of the command and ignore the original built-in. I was taking a look at the tutorial and as every Quest tutorial, it is not really made for dumbs like me, but they are very good.
There are two suggestions I could give you. The first would be following the explanations as a recipe and check if you can create your first functional command. The other suggestion if listing what command you want doin what and working how and try getting help for each case especifically.