• Content count

  • Joined

  • Last visited

Community Reputation

137 Neutral

About Selacius

  • Rank
  1. XML Script Parser in AS3

    I've resolved the issue I was having. I replaced the for statement with a while statement which looks to ensure a pause variable is false. The pause variable is triggered to true when the text or choices command is triggered. It is working exceptionally well, I am slowly implementing more commands. I will post the full script when complete. Thanks again for the help.
  2. XML Script Parser in AS3

    So I have been trying your code but seem to have an issue with the automated portion. It's working, however I am having issues with it processing too much. Take the first portion of the NPCAction code from above. It should display the text and then wait for a user input before moving onto the qstchk nodes. However, with the for statement, it's processing it all at once. Not sure how to resolve this for the purposes I am looking for.
  3. XML Script Parser in AS3

    Thanks again for helping out with this. I will definitely try it out and see how it works. In the example above of my XML, the items which require user input and that should halt the processing of the parser is the text and choices. So basically until there is user input nothing should be continued and then once things continue it can be parsed further and automatically until the next instance of text or choices. If this means the qstchk will traverse multiple nodes (as in the example above), thats ok. I hope this makes sense. I will use the code and see how it works. Thanks again. Also, in your script you posted, each function has a currentstatus:int associated with that. Where does that get fed from?
  4. XML Script Parser in AS3

    Wow. That looks great. I will definitely take a look at it and use it as a baseline. My only concern is that the for loop might cause all commands to be run at once without the proper stops and waiting for user input. Basically every <text> or <choices> command needs to pause execution and await a user rrsponse before continuing.
  5. XML Script Parser in AS3

    I'm not sure I understand the issue with putting status in the xml file. Maybe I should explain the snippet I posted in OP. Basically its the conversation that will be tied to a specific NPC. Everytime there is a <text> or a <choices> tag a message window will display which awaits for user input to continue. So in the case of the snippet, basically the NPC greets the player and after player input (generally Enter button) the NPC will then check to see if a specific quest is at a certain progression (used for quests with multiple stages), depending on the progression of the quest, two pathways can occur, the TRUE condition which is where either the player has finished the quest or has the required items to finish the quest and then the NPC will complete the quest, or the FALSE condition where the NPC asks if the player would like to start the quest. I'm thinking what I can do is to parse the XML file into nodes and store these into an array and then iterate through the array (as each node will be a seperate process).
  6. XML Script Parser in AS3

    Thank you for your input.  I've worked with XML extensively in this project already, but in this regards I am unsure how to design and execute the parser. I'm going to try to implement something with a basic command first and go from there. It just seems that there might be a lot of if....else if statements going on and it won't be as dynamic as I'd like. For example there would be something like if ( == "text") {    draw text function here; }  
  7. I'm trying to make an XML script parser using AS3 (which my game is being developed in) to handle NPC interactions and down the road to assist with scripting battle sequences. My goal is to develop a system which is similar to that used within the RPG Maker series of programs, in that you script events and they run on interacting with said event. I've created a small list of commands which I want to start out with, but I am having difficulty trying to figure out how to specifically start. Basically for the purpose of NPC conversation, the NPC script will be attached the NPC movieclip, and when the player interacts then it will run/implement the script/commands through the XML parser.  Here is a small example of what the command structure within the NPC would be like. <text face=TRUE ID=0 loc="LEFT">Good day sir. Loving morning out there.</text> <qstchk ID=0 status=0 oper=">=">     <TRUE>         <qstchk ID=0 status=1 oper="==">             <TRUE>                 <text face=TRUE ID=0 loc="LEFT">I see you have my 5 Iris'. Thank you very much. Here is your reward.</text>                 <qstset id=0 status=2></qstset>             </TRUE>             <FALSE>                <text face=TRUE ID=0 loc="LEFT">You've given me my Iris', I cannot help you anymore.</text>             </FALSE>     </TRUE>     <FALSE>         <choices num=2 ques="I've got something I could use your help with. Do you mind assisting me?">             <opt id=0 text="I'd be more than willing to help, what can I do?">                 <text face=TRUE ID=0 loc="LEFT">Excellant. I'm in need of some flowers. Can you collect me 5 Iris'. Thanks.</text>                 <qstset id=0 status=0>             </opt>             <opt id=1 text="I'm sorry, I haven't the time right now. Maybe later">                 <text face=TRUE ID=0 loc="LEFT">Very well, maybe next time.</text>             </opt>         </choices>     </FALSE> </qstchk> Most if not all of the commands would relate to specific AS3 functions that would display text on the screen, etc while a few others (qstchk) would just basically be an if statement to compare the progress in a quest with a specific value and then based on this value the script would continue in either the TRUE or FALSE direction. Any assistance with this would be greatly appreciated.
  8. I'm looking for a method to store my NPC dialogue for my AS3 RPG game. I've looked online and found numerous people recommending a scripting language such as Python or LUA that will actually parse the dialogue context and display this in game. I am very curious how I could specifically implement this into an AS3 game. I am hopeful that I can get my dialogue system to be similar to the way it would work in the RPG maker series of game makers. If anyone can assist with this and also give me a good starting point on how to make a dialogue engine that would be fantastic. Thank you.
  9. [.net] Buncha C# Questions

    Hmmm. No one knows where the error is coming from ehh. Damn.
  10. [.net] Buncha C# Questions

    When I build the program, it builds successfully, but comes up with this error without displaying the program.
  11. [.net] Buncha C# Questions

    Alright, i've done all that. Except when I build the solution I get this error: "Object reference not set to an instance of an object." in reference to one of the variables which need to be set in the mapdata class. I have this in the explore class: private static string[,] tiletype; //Map Tile Type private static string[,] tilepic; //Map Tile Picture public static string[,] mptiletype { get { return tiletype; } set { tiletype = value; } } public static string[,] mptilepic { get { return tilepic; } set { tilepic = value; } } Which I believe is wat you had mentioned in regards to the adding a property in the explore class. So I'm not too sure where i've gone wrong or wat i need to do.
  12. [.net] Buncha C# Questions

    I have no idea how I'm gonna set it up, kinda why I'm asking here. I'm not sure which would be the best way to do it. As i've explained before I need two classes, the first will query the db and put the current map into an array, while the second one will take this array and display a selected portion of it on the screen. I need to do it this way because on the tab page I have buttons which represent north, west, south, and east. When clicked if the player is not moving to a new map, then only the second class needs to be refreshed, while if the player is moving to a new map the first and second class need to be refreshed. I have it setup like this so far: public partial class explore: UserControl{ public explore() { //code for converting db query to array } public void exploredisp() { //code for displaying the array } Now its only processing the first class and not the second. I tried to make the second class public exploredisp() bt it said that "Class, struct, or interface method must have a return type". Im not too sure how to solve it. [Edited by - Selacius on June 15, 2007 12:22:18 PM]
  13. [.net] Buncha C# Questions

    When I said about the two classes, I meant in one user control. Is that allowed or even good practice? I don't want to separate the two bits of code, id like to keep them in the same file, but have some method of reloading only one chunk while leaving the other.
  14. Equipment Design

    I quite like that idea actually. I think I may implement it and make some modifications. Have different materials (wood, bone, stone, bronze, iron, copper, steel, glass), to go along with the base weapons. Then have things such as polishing, gem encrusting, etc which add other modifiers to the weapons. Thanks, I like the idea for sure.
  15. Equipment Design

    Yea I'm still debating if I want stat enhancers from the equipment or not. I have at the moment a list of 72 random prefixes and suffixes that I draw from for the rare weapons. I'm thinking I may just remove the stat enhancers all together, but I'm not entirely too sure on that yet.