| 03-16-2004, 07:33 PM | #1 |
Heyas, i have a spell which is a 2 ability spell, basically 1 ability marks every unit, and when you use the other ability it kills all the marked units, problem is the hero doesnt get exp or money for the kills. this is how i did it, maybe the method im using is wrong but its the only way i can think of, basically, every unit that gets marked, becomes owned by player 3, (player 2 and 3 are on the same team, they are the computers) and once the hero uses the death ability, it kill all units owned by player 3. anyone got any ideas on how to get bounty for that? |
| 03-16-2004, 07:41 PM | #2 |
create a new unit type (I'll call it "killer"). give the created unit ability "AOE damage on death" modified to do a ridiculously large amount of damage, and almost no AOE. give it the goblin land mine model, scaling value 0.001 or the smallest you can get it, to make it effectively invisible. Then whenever you want to kill a unit and have the player gain bounty, do the following: --create a killer at the position of the target --kill the killer you just created. This will even give your hero experience for the kill! Good luck // Ligature |
| 03-16-2004, 07:47 PM | #3 |
| 03-16-2004, 07:49 PM | #4 |
In the event that this does not instantly kill the units, you can do the above with a loop, (1 to (# of units in player group (targets)), where targets is all the units in the blast radius. Create said unit and kill it. The leveling trigger would store a certain unit type equal to the the unit with the right amount of damage on death as you want the spell to do. |
| 03-16-2004, 08:48 PM | #5 |
i tried it and it works perfectly, but i just have one little problem... what if i mark multiple units? it creates the land mine on all the marked units but only one of the land mines actually blow up. |
| 03-16-2004, 10:16 PM | #6 |
Not sure if this is the problem, but check your trigger: if it kills "Last Created Unit" after all the mines have been created, it will only kill the last one created! So you'll need to kill last created unit after every time you create a new mine unit. |
| 03-16-2004, 10:53 PM | #7 |
Create a mine, add it to a unit group Loop for 1 to # of units in unit group set varialbe = random unit from group kill unit remove unit from unit group |
| 03-17-2004, 03:26 AM | #8 |
works like a charm, thanks :) |
