Working on making a Chain mine ability based off of locust, however I'm having trouble getting the triggers to cooperate. The idea is that, he releases 10 or so mines which will explode once he attacks them, but unless i get the trigger working, the mines will damage him too...
heres the trigger work
Chain Mine Trigger Events Unit - A unit Dies Conditions (Unit-type of (Dying unit)) Equal to Chain Mine Actions Set TempPoint2 = (Position of (Dying unit)) Unit Group - Pick every unit in (Units within 250.00 of TempPoint2 matching ((Unit-type of (Picked unit)) Equal to Chain Mine)) and do (Unit - Kill (Matching unit)) Custom script: call RemoveLocation( udg_TempPoint2 )
i guess you should take a look into the 'mine explode' ability and set the targets so they don't include 'friend' (or whatever it's called in eng) play around with their target settings a little and it should work fine.
- Raszul
PS: the trigger looks ok - there is nowhere damage dealt, therefore it should not damage the caster
tried that, but then they dont kill the other mines, nulling the whole chain effect.
as for the damage, the mines explode upon death.
13lack.1)ragon
#4
are mines mechanical? if so, make it only target mechanicals and not organics.(Your caster) If for some reason he IS mechanical set it to, non herooes.If caster isnt a hero ANd is mechanical, make that single unit a ancient' qualification, and setmine explode to non-ancient if this ALL fails, you have a hard spell to work on.
I guess I could do that, but if i want to advoid his mines targeting allies in general, Im gonna have to make it an all ancient force...which I'll do for now...I just fear I'm going to regret it soon.
you want the mine ability only to target enemies and themselves.
make them 'mechanical', 'ancient'
set the allowed targets for the explode ability = 'enemy' add the ability once more this time with the following targets: 'friend', 'mechanical', 'ancient', ('non hero', ...) and this one with max damage.
//the stuff in brakets only if you still experience problems.
you do not need any trigger (besides maybe for the spawning) and it'll work quite fast anjd easily.
i hope this tells you what i ment before...
- Raszul
Waldbaer
#7
You could also do it without the real mine explode ability at all and just simulate it, I think. Remove the ability from the mine unit and just do the following:
Event -unit dies Conditions -(Unit-type of (Dying unit)) Equal to Chain Mine Actions set targets = (e.g. units in Range 250 matching ((unit type of matching unit equal to Chain Mine) or (owner of matching unit is an enemy of owner of triggering unit))) Pick every unit in targets and do Kill picked unit
If you want to do damage instead of killing every unit instantly, you can of course also use the Damage unit action instead of kill. If you want some sort of damage depending on the distance to the mine, you can of course also add some mathematics to the Damage unit action, ask if you need help with that. The advantage of this trigger is that you have better control about what is a target and what not, I think.