| 02-04-2006, 02:18 AM | #1 |
First off, hi to everyone here as I am new. I've been reading a lot of the forums and everyone here seems really cool. I have a good bit of experience making warcraft 3 maps, though nothing compared to some of the others on here. I don't know specifically JASS very well, but I've done a few years of C++ and Java and after looking at JASS it seems somewhat similar and easy to comprehend. Though truthfully, I prefer triggers to writing code. My first question involves trying to upgrade a hero and keep the abilities that he has. When the hero reaches a certain level, I use a trigger to add a new ability to him depending on which hero it is and his level. All that works just fine. The problem comes that I want to allow the hero to change forms along the way. What would be the best way to do that and still keep the abilities he has already learned? I have tried Metaporphisis (sp), which works except for one small problem. For the abilities to hold, both the original form and the new form must have the same ability list. In my case, neither of them have any abilities to begin with. All abilities are added using triggers. Question 2: Although the hero can learn many more than 5 skills, I only ever want my hero to know 4 skills at one time. So, when the hero can learn a new skill, a menu comes up and asks which skill to replace. (I have to find the trigger code to create a menu of choices that I have somewhere for this.) How do I get a list of skills the hero currently has so that I can create this list? And I have a third question, but it should be simple. Is it possible to change the hotkey of an ability midgame? Any and all help with these problems would be greatly appreciated. |
| 02-04-2006, 03:49 AM | #2 | ||
Quote:
How about you monitor which abilities the hero has in an array? Set it up so that it always has the heroes current spells (add them when it learns them etc.) and then use this array to index what abilites the hero has when you set up the dialogue [remembering to update it as the hero swaps abilities]. You can also use this array to manually add the abilites the hero has each time he morphs. Quote:
No. |
| 02-04-2006, 04:28 AM | #3 | |
Quote:
I thought of doing that, but there is a problem with doing that (sorry forgot to mention it). Each player can have more than one hero. At max a player will most likely have twelve, still have to decide on a max. So the array gets very large very fast. (10 players x 12 heros x 4 abilities = 480 elements in the array) That is a really big array. Who knows though, war3 may not have a problem with that, I don't know. If no other solution can be found than I will have to resort to that, but I'm hoping another more memory friendly solution can be found. Thanks though for your suggestion. |
| 02-04-2006, 06:38 AM | #4 |
Wc3 can handle it. |
| 02-04-2006, 07:01 AM | #5 |
ok, cool. Then that solves both my problems of having the heros change and generating the menu to replace abilities. Shit, now I have to find the code for that. It's hidden in one of the many map ideas I abandoned along the way. If anyone has that or can direct me to where I can find it I would greatly appreciate it. Edit: Sorry BBDino, never gave you rep. Still learning the flow of the message board. |
