Home / scram / doc     frequal.com  RSS Feed

ScraM: User-Defined Commands

You can create your own commands in your modlet using the '"xyz" command is invoked' event type in the Event block (from the Events tab). Often the command doesn't need any more information, like '.play' in spleef. It builds the arena and starts the game without any extra info.

Parameters

However, if you need more information, you might want people to enter parameters after the command. Say you are making a command to teleport the player. The player will want to specify the destination coordinates, like this:
.tp 0 105 0
Your command can find the user-provided parameters in a list of strings called 'parameters'.

More coming soon...


Last modified on 6 May 2017 by AO

Copyright © 2024 Andrew Oliver