| 05-23-2004, 11:55 PM | #1 |
I need help on his hero system: If you're Vex, skip all the way to the end. If you're not, then read: I am having trouble deleting this JASS function where the computer selects a hero. Here is the WHOLE thing. EDIT 2: Scroll down. Vex: Long story short: How do you get rid of Computer Hero selection? EDIT: Woah... Huge post. |
| 05-24-2004, 12:00 AM | #2 |
If you think... ANYONE... Is going to read all that. Your insane. (If any of you read it just to prove me wrong, you get to get stabbed in the face. :P) |
| 05-24-2004, 12:05 AM | #3 |
One can always hope ^_^. I know it's extremely long, but thats practically the only way, also, Vex did include hints and helpers, but I am not sure which parts to delete... |
| 05-24-2004, 12:42 AM | #4 |
Just skipping through that code ....... it looks like you just pass it "false" o_O ..... read the comments for that function you're messing with: function StartVxHSS takes boolean rand, boolean comps, boolean cleanup returns nothing // // (The Main Function that Starts the Selection System and Finishes it) // // - rand boolean argument determines the availability of the random hero option. // - comps boolean argument determines if Computer Players can Choose their Heroes // - cleanup boolean argument determines if the gallery heroes are removed once everybody gets a hero. // So .... do you want Computer Players to be able to choose their heroes? Pass "true", else ... pass "false". Sounds that easy atleast. However, I may misunderstand what you need, and may have missed something in the code. ~Cubasis |
| 05-24-2004, 12:51 AM | #5 |
Man, that is long. Whew. You would remove that section... except that Cubasis already got it and you can just set comps to false. It does say elseif comps then... Of course you could also remove that section of code if setting comps to false doesnt work , but I dont see why it wouldnt work. And you should just try it, I dont see why you asked as you could have just deleted it and nothing too bad could have happened. |
| 05-24-2004, 12:53 AM | #6 |
I have successfully removed the computer choosing thing (I hope). Now, what I don't know is if this will cause a major memory leak(s). Here is the (slightly shortened) code... Code:
// [b]Edited by Lord Vexorian[/b] I don't feel confortable with my code appearing that easy without people downloading my stuff, and there isn't a reason to keep it so |
| 05-24-2004, 11:00 AM | #7 |
At the risk of almost spam-posting, why dont you just try it yourself, and if you get a memory leak, ask why. I don't see why removing an if would cause a memory leak unless Vex decided to put all his anti-memory leak code in the elseif. And don't forget the endif. |
| 05-24-2004, 02:05 PM | #8 |
Death .... I told you .... I don't even think you're calling this function ... Becouse if you were, then you'd know about the 3 boolean parameters you pass to it, where one of it is "comps". And as I already said, and johnfn confirmed .... *beware, incomming capped message* IF COMPS IS EQUAL TO FALSE, THE COMPUTER WILL NOT PICK PLAYERS. *end of capped message* However, I guess that's the other way of removing it .... heh, except the fact that it's strongly inadviced, as you are a novice jass coder, and you actually editing that code could be pretty dangerous. Anyways, it should still work the way you posted. And as I said on irc, you don't have to worry about Memory Leaks. Becouse of the following equation: JASS != MemoryLeak Anyways. :) ~Cubasis |
| 05-24-2004, 07:26 PM | #9 |
Have Vex released a new one in JASS? Because the one I'm using is still in the GUI. Well, it works and from what i read i don't think he added enough new stuff to implent another one. |
| 05-24-2004, 10:35 PM | #10 | |
Quote:
And yes, in your setup trigger you call StartVxHss at the end right? then you change the boolean to false as Cubasis said and done |
