• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Soul Trap

Status
Not open for further replies.
Level 9
Joined
Apr 4, 2004
Messages
519
Okay, I'm having a small problem with my Soul Trap ability. The point of it is, that when a hero uses Soul Trap, it creates 4 Soul Wards around the targeted enemy unit, and then the Soul Wards drains the units health over time. This is my current triggers.

  • Events
    • Unit - A units Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Soul Trap
  • Actions
    • Unit - Move Soul Ward 0004 <gen> instantly to ((Target point of ability being cast) offset by 256.00 towards 0.00 degrees), facing (Target point of ability being cast)
    • Unit - Change ownership of Soul Ward 0004 <gen> to (Owner of (Triggering unit)) and Change color
    • Hero - Order Soul Ward 0004 <gen> to use (Item carried by Soul Ward 0004 <gen> of type Soul Drain)
This is how it goes for all four of the wards. The problem is, that I can't seem to order the Soul Wards to use the item they have on a specific unit. How do I fix this? And yes, obviously the units have a Hero Inventory and the item already on them. Thanks in advance.

~Darkey
 
Yeah, that was the problem I pointed out. But by making it a direct spell instead, how do I make them use it? I noticed you can't make them use custom spells.
 
Whats the exact problem? The wards won't start their spell?
"
Hero - Order Soul Ward 0004 <gen> to use (Item carried by Soul Ward 0004 <gen> of type Soul Drain)"
To tell truth, i don't get what do you want to do with this?
I can't remember what does this trigger do, but i think:
a)This uses an item with no target.
b)Or this is spell, then ->
I think you have to use it's order ID. you can check it in the object editor. Use/turn on.. or something like this.
If it's in item, i think you have to use it like "order a unit with an object target". (don't know the exact name again...)
You might use "event response - spell target" (or smg like this).
I hope I could help you a little.
 
Whats the exact problem? The wards won't start their spell?

Darkey said:
The problem is, that I can't seem to order the Soul Wards to use the item they have on a specific unit.

That was the exact problem. And Life Drain requires to target a unit to be able to being cast. Unfortunately I don't seem to be able to do that with an item.
 
Yeah, that was what I did, but it still won't work. I based it on Life Drain, I only changed the mana cost, set it to a creep ability, the duration to 5 seconds and the damage to 18.75 dmg/s. Yet it won't work. And it looks like this.

  • Actions
    • Unit - Order Soul Ward 0004 <gen> to Neutral Dark Ranger - Life Drain (Target unit of ability being cast)
 
Meh, I dunno. One sec while I try it. Will post triggers.


Here we are.

It works for me.

  • Life Drain
    • Events
      • Player - Player 1 (Red) types a chat message containing -life as An exact match
    • Conditions
    • Actions
      • Unit - Create 1 Priest for Player 2 (Blue) at (Position of hawk900 0000 <gen>) facing Default building facing degrees
      • Unit - Add Life Drain to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Dark Ranger - Life Drain hawk900 0000 <gen>
This leaks but that is easy to fix.
 
Well, it seems to be partly working now. But the spell only spawns one ward that life drains even though I got it triggered to spawn 4 of them around the unit. This is how the trigger looks like at the moment.

  • Soul Trap
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Soul Trap
    • Actions
      • Unit - Create 1 Soul Ward for (Owner of (Triggering unit)) at ((Position of (Target unit of ability being cast)) offset by 256.00 towards 45.00 degrees) facing 315.00 degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Life Drain (Neutral Hostile) to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Dark Ranger - Life Drain (Target unit of ability being cast)
And the problem is not that they all clash into each other, they all got different degrees in their spawning trigger. I tried adding an unwanted Wait 0.10 seconds trigger between each spawn & order unit but that didn't help.
 
copy that trigger 4 times with wanted angles

Yeah, I got those trigger for all wards, I just didn't bother to write them over and over. :P

Squiggy: I partly understood those triggers but I'm a little confused with the variables. But I'll give it a try and let you know how it went.
 
Here's the fixed one:
  • For each Integer A from 1 to 4 do:
    • Set var = var + 90
    • Set temppoint = Position of (target unit of ability being cast)
    • Set temppoint2 = temppoint with offset 256.00 towards var degrees
    • Unit - Create 1 Soul Ward for (Owner of (Triggering unit)) at temppoint2 facing (target unit of ability being cast) degrees
    • Custom script: call RemoveLocation(udg_temppoint2)
    • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
    • Unit - Add Life Drain (Neutral Hostile) to (Last created unit)
    • Unit - Order (Last created unit) to Neutral Dark Ranger - Life Drain (Target unit of ability being cast)
  • Custom script: call RemoveLocation(udg_temppoint)
  • Set var = 0
Let me explain a bit:
The variable var defines an integer which shall be increased by 90 everytime the loop runs (so, 4*90 = 360) and, of course as you set var for the degrees, it also defines the angle.
The variables temppoint and temppoint2 shall be self-explaining and in the end, the value of var is set back to zero ;)
 
Sry it took me so long but i was afk. Why dont you just use varibles. They store information and everything. One thing is Last created Unit will only be for the last one created. Set a varible under "Unit - Create 1 blah blah" and set it to last created unit.

Next have a unit alreadyhave the spell so they dont have to get it quick and cast. besides that everything should work. Thanks for rep before
 
Status
Not open for further replies.
Back
Top