• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Make a dummymissile move to an area

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
Hi!

I thought about use Serpent Ward to create a dummy-unit at a location.
When Serpent ward is casted a dummy-missile is created at the caster.
The dummy-missile moves to the serpent-ward-dummy-unit and when it reaches it's target it explodes.

The caster can not move. The serpent ward dummy-unit does not move.
The only thing that moves is the "dummy-missile"

How do I do to make such a spell?

{EDIT}
A caster casts "Serpent ward Spell" and places a dummyserpent on the ground.

  • MissileTargetLocation
    • Events
      • Unit - A unit enters (Current camera bounds)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy Serpent (Level 1)
    • Actions
      • Set DummySerpent = (Position of (Triggering unit))
When the dummy-serpent is created, a Dummymissile is spawned at the location of the caster and moves to the position of the DummySerpent Ward.

  • MissileMove
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Dummyserpent
    • Actions
      • Unit - Create 1 Missile Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Set DummyMissile = (Last created unit)
      • Wait 0.10 seconds
      • Unit - Order DummyMissile to Move To DummySerpent
So far, everything works fine. But how do I do to make the DummyMissile explode when it reaches it's target?
 
Last edited by a moderator:
Level 8
Joined
Aug 1, 2008
Messages
420
  • Wait until ((Distance between (Position of DummyMissile) [<--- this leaks btw.. you'll need a point variable here] and (Position of Target unit of ability being cast)) [<---- you need a variable there!] Less than or equal to 250.00), checking every 0.10 seconds
  • Special Effect - Create special effect at TargetPos [create this variable] using bla bla
Simplez ;d
 
Level 10
Joined
Jun 1, 2008
Messages
485
Try this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to <Dummy Serpent>
    • Actions
      • -------- Change Owner --------
      • Unit - Change ownership of (Summoned unit) to Neutral Hostile and Retain color
      • -------- Get Location --------
      • Set Point[1] = (Position of (Summoning unit))
      • -------- Create Dummy --------
      • Unit - Create 1 <Dummy Missile> for (Owner of (Summoning unit)) at Point[1] facing Default building facing degrees
      • -------- Set MS --------
      • Unit - Set (Last created unit) movement speed to 300.00
      • -------- Order Attack --------
      • Unit - Order (Last created unit) to Attack (Summoned unit)
      • -------- Remove Leak --------
      • Custom script: call RemoveLocation(Point[1])
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to <Dummy Missile>
    • Actions
      • -------- Save Location --------
      • Set Point[1] = (Position of (Attacked unit))
      • -------- Damage Unit --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of Point[1] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is Magic Immune) Equal to False)))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Attacking unit) to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
      • -------- Create Effect --------
      • Special Effect - Create a special effect at Point[1] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Kill Dummy --------
      • Unit - Kill (Attacked unit)
      • Unit - Kill (Attacking unit)
      • -------- Remove Leak --------
      • Custom script: call RemoveLocation(Point[1])
It need dummy missile with 1 movement speed and can attack. Or you can change the attack to a dummy ability with 100 cast range, but you must change some trigger ofc.
 
Level 10
Joined
Nov 5, 2008
Messages
536
This looks really good! Thanks a lot! I shall try to implent this in my map now.

But I wonder how I get the missile to do damage upon it's death? (AOE-damage if possible)

Perhaps a trigger creates a new unit at the location of the dead missile?
The new unit is simply an explosion-model with immolation or (Goblin Sappers damage upon it's death)
The new unit just lasts 1 second so it really looks like an explosionl


Is there any better way?
 
Level 8
Joined
Aug 1, 2008
Messages
420
Well, my way, i would put all the units in 450 range of the target [can change, try to find the size of the explosion, and use that] in a group, then loop through making the caster damage them.
Ask if you need the trigger
 
Level 10
Joined
Nov 5, 2008
Messages
536
I have now got the trigger to work. But there is a thing that worries me.

Two dummyunits are created: One dummy that marks the location and one missile-dummy that flies to the location and kills itself and the location-dummy.
But since the location-dummy needs to be killed, it can not be a locust.

That means:

1) It can be selected, which is weird
2) It can be killed before the dummy-missile reaches to it. In that case, the dummymissile just hangs in the air and does not vanish.


Is there anything I can do to prevent this from happen?
 
Level 10
Joined
Nov 5, 2008
Messages
536
invulnerability would prevent it's killing. Locust ability would prevent both killing and selecting.

But if I make both units as locusts, they do not kill each other. That means that they both just hangs in the air.

What can I do to make the units unselectable and unkillable? (So other units can't kill them atleast)
 
Level 10
Joined
Jun 1, 2008
Messages
485
But since the location-dummy needs to be killed, it can not be a locust.
Unit with Locust ability can killed with trigger. Or, you can add expiration timer to that unit.

invulnerability would prevent it's killing. Locust ability would prevent both killing and selecting.
Right, but both of that can still killed with trigger or expiration timer.

But if I make both units as locusts, they do not kill each other. That means that they both just hangs in the air.
Maybe you just order the Locust to cast ability with 100 range to that unit, but i don't know if a target-unit ability can casted to locust.
 
Status
Not open for further replies.
Top