|
|
Register •
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Q: SWATH UserDefinedCommands
| Author |
Message |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 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?
_________________ Suddenly you're Busted!
|
| Wed Aug 17, 2011 11:13 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 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.)
_________________ Suddenly you're Busted!
|
| Thu Aug 18, 2011 5:51 pm |
|
 |
|
maidenariana
Gameop
Joined: Mon Aug 25, 2003 2:00 am Posts: 233 Location: USA
|
 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?
_________________ twgs: telnet: reviving this in Sep 2019 web: http://www.roguegalaxy.com
|
| Fri Aug 19, 2011 4:43 pm |
|
 |
|
Helix
Ambassador
Joined: Wed Nov 12, 2008 8:57 am Posts: 3554 Location: Long Beach, CA
|
 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
_________________ Helix Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars. Lest we forget I had to ask myself WWSGD?
|
| Fri Aug 19, 2011 4:57 pm |
|
 |
|
Mongoose
Commander
Joined: Mon Oct 29, 2001 3:00 am Posts: 1096 Location: Tucson, AZ
|
 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.
_________________ Suddenly you're Busted!
|
| Fri Aug 19, 2011 7:02 pm |
|
 |
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 25 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|