• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Chain Mine Triggering

Status
Not open for further replies.
Level 3
Joined
Apr 20, 2005
Messages
34
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 )
 
Level 6
Joined
Feb 18, 2005
Messages
263
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
 
Level 7
Joined
Dec 17, 2005
Messages
337
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. :)
 
Level 3
Joined
Apr 20, 2005
Messages
34
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.

thanks =P
 
Level 6
Joined
Feb 18, 2005
Messages
263
Why are you doing it that complicated?

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
 
Level 10
Joined
Jul 14, 2004
Messages
463
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:

Needed variables: TempPoint (location), targets(group)

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.
 
Status
Not open for further replies.
Top