ID:161635
Apr 15 2008, 8:52 am
|
|
The only command that can be performed by a macro is one beginning with a dot, so how can i make my own proc to be called by a macro?
|
Apr 15 2008, 9:52 am
|
|
anyone?
|
In response to Adam753
|
|
Usually it's frowned upon to bump a post only an hour after first posting. :P Most people would ask you wait at least a day before bumping.
The DMF editor allows to to specify macros for each window you create. Double-click your dmf file, and create a new list of macros in the macro section. Then in the window you want to add them to, double-click it in the list to edit it, and set it's macro setting to use the macro list you just made above. |
In response to Xooxer
|
|
Yes, but how can i create my own command, and use it with a macro?
mob/proc Obviously this would give me an error (or at least, it wouldn't work as intended) but how can I do something like that? |
In response to Adam753
|
|
Trying using the Search box at the top of the page. Type in Macros and click the drag box down and click Resources. There are a few tutorials on it.
|
In response to Adam753
|
|
You don't put a period on the beginning, for one. Those are only used to show those commands as BYOND commands, not commands in the game.
mob macros can only be verbs, so procs will have to be added to the mob's verb list before they can be used as macros. Instead, define your command as a verb, not a proc. Then in your interface editor, create a new macro list and define the key to use, then fill in the name of the command it calls, in this case, "use". Then add that macro list to the window you want by setting that window's macro setting to the list you created. |
In response to Xooxer
|
|
macro//Defines the below as Macros I know its indented wrong but im just giving you the idea. |
In response to Magicbeast20
|
|
It's also the 'old way' to do it, and you also do it wrong, so it won't work.
|
Commands beginning with dots have don't have anything specifically to do with being used in macros or designating being default BYOND commands.
Putting a dot in the beginning of a command name is an alternate way of hiding it from verb panels and command-line command-expansion. Naturally the default BYOND commands are hidden so they don't clutter up the command panels, etc. You can make your custom command names have a dot (or pretty much anything you want, but certain unusual/foreign characters can mess things up, so only use standard "English" characters and symbols) by using the verb name setting to override it. For more information on this you can look up the 'hidden' and 'name' verb settings in the DM Reference. As for putting default macros in your game: like Xooxer said, it should be done threw the interface editor which has a newer, better and more flexible implementation of game macros. There is also the older, less useful way Magicbeast tried to explain which involves the syntax he posted being used in the client/script variable or a DM Script file (.dms) included on your project (or a .dms file you've set the client/script variable to). For more information on this method, look up the 'script var (client)' and 'macros (client script)' in the DM Reference as well. |