• 🏆 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!

Parasite Spawn Without Death? help with wait.

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
I am trying to make a spell like parasite which only deals initial damage instead of damage overtime and that spawns a unit after some time and not upon targeted units death.

I tried triggering the thing and it seemed like a simple trigger but I am having problems using the wait action. Everything works without waiting, but I need some time to pass before the unit spawns and basically every string after the wait action are ignored and never acted out.

Here's what I have so far and everything before wait is acted out no problem.

  • Pregnancy
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Parasite
    • Actions
      • Sound - Play WardenDeath1 <gen> at 100.00% volume, attached to (Target unit of ability being cast)
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 60.00 damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • Wait 6.00 seconds
      • Unit - Remove All buffs from (Target unit of ability being cast)
      • Special Effect - Create a special effect attached to the base of (Target unit of ability being cast) using Objects\Spawnmodels\Human\HumanLargeDeathExplode\HumanLargeDeathExplode.mdl
      • Unit - Create 1 Daemonic Whelp (food) for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
a spell like parasite which only deals initial damage instead of damage overtime and that spawns a unit after some time and not upon targeted units death.

When the parasite spawns a unit, it kills it?

So this custom parasite only deals X damage on cast, no damage over time, and after Y seconds it always kills the unit + creates the spawn?

I think your code will work if you use a few custom scripts, because it looks like calling "Target unit of ability being cast" doesn't work after using a wait (I believe it acts like a global variable).

Instead first store it in a variable of type unit , i.e.

custom script: set udg_target = Target unit of ability being cast

which should be stored before the wait.

Then it should work.
 
Status
Not open for further replies.
Top