| 02-01-2003, 10:28 PM | #1 |
Guest | hi, im having a problem in my map that when i give a specific spell to a unit, sometimes it uses it and sometimes it doesnt. for example, in one map, when i give an archer inner fire and faerie fire, it uses it. another map, i give an acolyte frost armor and UF, and it uses it. however, in my current map, when i give a grunt roar or a shaman raise dead, it doesnt use it. in fact, none of the units on the map use any unit spells. how can i fix this? |
| 02-01-2003, 10:31 PM | #2 |
Guest | Are the units computer controlled or user controllered? I am assuming its an AI deal. Make sure the unit has enough mana for one. Also, if all else fails, you can very easily do a trigger to detect if an enemy is withen a certain range, and if it is, use the spell. Ai Scripts need to be ran too. |
| 02-01-2003, 11:33 PM | #3 |
Guest | yeah i have all the units computer-controlled and they all have enough mana. how do i run the ai scripts you are talking about? |
| 02-02-2003, 08:14 PM | #4 |
also some of the abilities that you give them might have to be researched in the first place before they are useable (e.g. roar). At least i think you have to do that |
| 02-02-2003, 09:07 PM | #5 |
Guest | no, roar is a spell the dotc starts out with. i also tried giving it neutral hostile roar, but that doesnt work either. also, ALL units dont use their spells, not just 1 specific unit |
| 02-03-2003, 03:10 AM | #6 |
Guest | help! |
| 02-03-2003, 09:53 PM | #7 |
Guest | /me whacks off |
| 02-04-2003, 04:32 AM | #8 |
Guest | :( |
| 02-04-2003, 02:06 PM | #9 |
Guest | I have dealt with this issue myself. And there are two different ways to go about solving it. Your problem is basically that the AI doesn't know to use the spell you gave the unit. Some spells on some custom units work, but not all. Not by a long shot. This is true for all custom units. They are outside the scope of the AI and as such the AI is unable to ensure that the spells are used. It does help, however. So, if you are not running the AI you can do so. This may fix your problem and it may not. The AI action is part of the standard Melee Initialization for any newly created map. The second method is a little more difficult, a little more imprecise, and has its own drawbacks. You can use triggers to force a unit to cast its spells using range detection. I do not have the WE here at work so I cannot tell you the specific sequence, but it should be fairly obvious once you start looking. You can set the event to be a periodic timed event or by checking if a unit is in range. Be sure to set a condition to verify that the unit is of a type that can be cast on and that it is an enemy or friendly as appropriate. There is a third solution to this issue, but as I have no knowledge whatsoever of custom text editing, I cannot enlighten you on that particular route. Using custom text editing you could create your own AI script for the map that would tell the units what to do as an overall strategy for the computer. Hope this helps. Good luck. |
| 02-06-2003, 02:03 AM | #10 |
Guest | hmm, so by using custom units instead of regular ones, none of them can use any spells? |
| 02-06-2003, 11:43 AM | #11 |
Guest | I did not say that. I said that some spells on some custom units aren't utilized the way or to the extent that you expect. I did not use the the word none or all. Computer controlled heroes are sometimes the worst. Without guidance they often won't even train their skills up. You have to do it for them with triggers. It all comes down to AI. You have created a unit that the AI doesn't understand. Supposedly, the Frozen Throne expansion pack is going to include an upgrade to the WC3 AI. We can only hope. |
| 02-07-2003, 01:35 AM | #12 |
Guest | If you're not ordering them to do anything in specific, give the units abilities which have editor suffixes after them -- ex: Cripple (Neutral Hostile). Generally, anything with the Neutral Hostile suffix already has a basic AI telling the unit when to cast it and when not to. Some specific rules apply; ie. they won't cripple very low hitpoint units, but right now I can't think of any other spells with similar casting rules. Just go for spells that creeps in AI maps already cast on their own and you're golden. edit: Also, make sure you use custom upgrades. Set every AI player's spellcasting researches to the max FOR EACH RACE -- Roar is a night elf spell, even if it's on a grunt. |
| 02-07-2003, 09:53 PM | #13 |
Guest | alright, ill use triggers to make them cast their spells then. thanks for your help :) |
