• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Mine Triggering Spells?

Status
Not open for further replies.
Level 2
Joined
Jan 10, 2008
Messages
5
I'm stuck on a map I'm currently working on, my first map ever infact, I got regular mines to blow up correctly, the simple part, but then I tried adding buffs and spells and the like to make them slow/frost nova/poison or anything with that category. The mines fail to activate such spell/buff that I want, only doing the damage.
 
Level 6
Joined
Aug 16, 2007
Messages
213
you are working in object editor only right? well you need a trigger:

Try this out im not sure that will work...

events:
-a unit dies
conditions:
-dying unit is euqal to goblin land mine(searc for unit type, i think it is in bolean)
actions:
-create 1 dummy for owner of dying unit at position of dying unit(create unit)
-order last created unit to human-mountian king thunder clap(unit isue order with no target)

And first crate dummy unit:
create a custom unit(take footman) set him idestructible and add him locust ability, and also thunder clap.set shadow to NONE, set attack to NONE, set model to like xxx(in custom path)
thunder clap set the damage xxx slow to xxx and mana to 0 and add it to dummy. firs make a copy of your map, and if this wont work try something similar to that.
 
Level 2
Joined
Jan 10, 2008
Messages
5
k that would solve the aoe spells such as frost nova but what about units that specifically trigger the mine, how would i implement a dummy to target the unit that walks over said mine?
 

Lux

Lux

Level 2
Joined
Jan 9, 2008
Messages
20
Well, the Goblin Land Mines automatically activate when a unit comes a distance of x units from them. As a result, you can accurately select the unit that originally triggered the Land Mine by simply picking every unit that is within x of the Land Mine and creating a dummy spellcaster for every selected unit.

Here's how the trigger should look:

  • Events
    • Unit - Generic Unit Event: A unit (Dies)
  • Conditions
    • Unit-type Comparison: (Unit-type of (Dying Unit)) (Equal to) (Frost Mine)
  • Actions
    • Unit Group - Pick Every Unit in Unit Group and Do Multiple Actions: Pick every unit in (Units within 100* of (Position of (Dying Unit) matching (Owner of (Picked Unit)) (Not Equal to) (Owner of (Dying Unit)) and do (Actions)
      • Unit - Create Units Facing Angle: Create (1) (DummyCaster) for (Owner of (Dying Unit)) at (Position of (Picked Unit)) facing (Default building facing) degrees
      • Unit - Add Expiration Timer: Add a (2.00) second (Generic) expiration timer to (Last Created Unit)
      • Unit - Add Ability: Add (Frost Mine) to (Last Created Unit)
      • Unit - Issue Order Targeting a Unit: Order (Last Created Unit) to (Human Sorceress - Slow)** (Picked Unit)

All the fields that I surrounded in brackets are those that are modifiable by the user in the standard World Editor Trigger Editor.

Take a look at the field that I marked with a single astrisk. Make sure that the range specified in this field exactly matches the triggering range that you've given the Land Mine in question. If you do not do this, a single unit might trigger the effect but several units might be harmed by the spell.

Pay close attention to the field that I marked with two asterisks. The order-string for the ability you want to cast is the order-string for the ability that it is based off of. If you base your spell off "Doom", for instance, then the order-string used to make the dummy unit cast that spell is "Neutral Pitlord - Doom".

Try to replicate this trigger in your map and tell me how well it works. Given that no variables are defined for the target unit, there is a possibility that the trigger run twice simultaneously, which will mess up the casting of the spells and the units that they are cast upon. However, I somehow find it difficult to believe that two players might accidentally step on two Goblin Land Mines simultaneously.

If this trigger doesn't work the way you intend it to work, don't hesitate to send me a Private Message detailing the problem: I'll be happy to help. Whatever the case may be, good luck with your map!

Lux
 
Last edited:
Status
Not open for further replies.
Top