Search results for query: *

  1. M

    Question about talking with multiple Objects

    I think I get it. But if I had hundreds to monsters or items, I would have to initially hand type them into the array in the first place, right? What if I was loading 1000 types of monsters from a text file or xml file?
  2. M

    Question about talking with multiple Objects

    Is there a way to refer to an instance of an object based on a variable? Dim targetmonster as string targetmonster = "zombie" if monster.name = "targetmonster" then 'respond a certain way, knowing that it's the 'zombie' instance you want to use targetmonster.dosomething() end if
  3. M

    Question about talking with multiple Objects

    When you use this line: Dim monstersOnField() As Monster = {basicMonster, zombieMonster, wolfMonster, loinMonster} Can I cycle through ALL the instances in that array using the index of monstersOnField() ? If I have 5 zombies, 5 wolves, 5 lions in the array I can cycle through them...
  4. M

    Question about talking with multiple Objects

    Thanks alot. I will put this in a project and check it out. I think it answers one of my questions, or at least, I know I'll learn something from it. I want to load all the monster's from an XML file... which will have all their properties all setup.
  5. M

    Question about talking with multiple Objects

    Hi Everybody! Hoping someone can clear up a great mystery for me…. I'm trying to learn Object Oriented programming, and to do so, I am writing a small Role Playing Game. I understand why we break Players, Items, and Monsters into Classes… what I don’t “get” is how does the program know...
  6. M

    resolved thread?

    Is there a feature on this forum to mark your answer as correct, or to make this thread as "resolved" ?
  7. M

    Remove Duplicate lines in a text File

    Wow, that's incredible, you solved it in 3 lines of code. I googled this for hours, and nobody had a clear answer, or an answer under 20 lines of code. I know nothing of LINQ, but it sure is a time saver. Thank you so much.
  8. M

    Remove Duplicate lines in a text File

    Hey Everyone, Having trouble removing Duplicate lines in a text file. (Exact Duplicate lines). If I have a text file called animals.txt, how can I use the StreamWriter to loop through a text file, and erase and duplicate lines? For example: If the text files says this... cat cat cat dog...
  9. M

    Can Controls refer to themselves?

    Wow, thanks alot!
  10. M

    Can Controls refer to themselves?

    John, Would you mind pointing me in the right direction on that? I don't even know how to get started looping the Controls collection?
  11. M

    Can Controls refer to themselves?

    Dim b as button Allows me to talk to the specific button that was clicked. Can I also control all the other buttons handled, within the same code? ie: I want the clicked button to turn yellow, but all other buttons that are "handled" but not clicked, to turn white?
  12. M

    Can Controls refer to themselves?

    Wow - this works awesome. Thanks!
  13. M

    Can Controls refer to themselves?

    Thanks alot for your thorough answer. I will work through this. Matt
  14. M

    Can Controls refer to themselves?

    Hi guys, I know forms can refer to themselves using ME. Can buttons do the same? I want to be able to click on a button, and set a string variable to be whatever the current button's text says. For example.... if you have 2 buttons, one that says "Dog", and one that says "Cat", for...
  15. M

    Question Removing 1 line from a text file

    Awesome. I'm going to try it, thanks alot. Anything I tried, wiped the whole file. I've lost hours on this. Thanks again.
  16. M

    Question Removing 1 line from a text file

    Hi Guys, I'm really stuck on something, which, is probably easy, but I've blown hours trying to figure this out. I need to be able to remove 1 line from a textfile. I will always know exactly what line it is, as, it's the same "string" as a variable. So if my variable is called "removeThis"...
  17. M

    Problem creating Slideshow... Help!

    Hmm..... looks like I might be able to use SPLIT or JOIN to do what I'm looking to do. Any thoughts guys?
  18. M

    Problem creating Slideshow... Help!

    Hey guys, putting together a simple training program in which I need to show the user text and pictures. I want them to be able to hit a "next button" which will step through the text and pictures, like a slide show. All the "data" is hard coded in the program, so I'm not using a database, or...
  19. M

    Copying an Object

    Is it really that easy?? Thanks so much!!!
  20. M

    Copying an Object

    Sorry, still pretty new bear with me... I have a Class called People. I have an object called Roger, another called Sally. How can I copy my 'Roger' object over top of 'Sally' so they are identical?
Back
Top