| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Q: SWATH UserDefinedCommands https://mail.black-squirrel.com/viewtopic.php?f=15&t=32083 |
Page 1 of 1 |
| Author: | Mongoose [ Wed Aug 17, 2011 11:13 pm ] |
| Post subject: | Q: SWATH UserDefinedCommands |
I've been studying ExampleCommand1 and some UserDefinedCommands that others have written. In the commands I've looked at, the runCommand() method starts things off by sending some text to the game. Then the onText() method handles the response, possibly sending more text and generating more responses. So far so good. But there's one thing I don't understand. What signals to the framework that the command is done running and endCommand() should be called? Is it when the buffer is cleared? |
|
| Author: | Mongoose [ Thu Aug 18, 2011 5:51 pm ] |
| Post subject: | Re: Q: SWATH UserDefinedCommands |
Stein got back to me on this. The answer is: UDCs are terminated when they get to a major prompt. So they should be designed to take you from one major prompt to another. (Apparently the CIM is not a major prompt, 'cause that's where my UDC was getting hung up.) |
|
| Author: | maidenariana [ Fri Aug 19, 2011 4:43 pm ] |
| Post subject: | Re: Q: SWATH UserDefinedCommands |
Mongoose wrote: Stein got back to me on this. The answer is: UDCs are terminated when they get to a major prompt. So they should be designed to take you from one major prompt to another. (Apparently the CIM is not a major prompt, 'cause that's where my UDC was getting hung up.) So what are all of the "Major" prompts then? |
|
| Author: | Helix [ Fri Aug 19, 2011 4:57 pm ] |
| Post subject: | Re: Q: SWATH UserDefinedCommands |
Command Prompt Computer Prompt Planet Prompt Corp Prompt For example H PS: I think Vid did a tutorial about this some time ago. Its in this forum somewhere |
|
| Author: | Mongoose [ Fri Aug 19, 2011 7:02 pm ] |
| Post subject: | Re: Q: SWATH UserDefinedCommands |
I'm guessing the "major" prompts are the ones there are constants defined for in com.swath.Swath: citadel, command, computer, corp, planet, and stardock. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|