HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit Deaths and Buffs, ect.

03-11-2004, 01:30 AM#1
Lazurus
Hey everyone,
I am trying to recreate a skill similar to the old Warlord hero's War Scream (or something along those lines) aura from the early stages of Warcraft 3. I am using an aura as a base, and I am trying to get units under the effects of the aura to have a chance of spawning an invisible caster who will then cast a spell, ect. ect. ect. I don't need help with the invisible caster part, but it seems that I cannot properly detect nearby dying units with the aura's buff, and I am not sure what to do. Can anyone offer me some help?

Hrm.. also, I was wondering if someone could point me in the right direction with a similar aura spell that creates an invisible caster who would then cast a spell every so and so seconds <-- that is the part I have a problem with, since the only action trigger I could find even remotely resembling this is check <condition> every (X) seconds, or something like that... so I need help with that too. :)

Thanks in advance.

- Lazurus
03-11-2004, 09:50 PM#2
Lazurus
Hrm, well, I've worked on this trigger more... too bad it is a mess, I can't seem to get this thing to work no matter what, ugh. (I decided to work on Reanimation Aura first, which is supposed to raise a random nearby dead unit every X number of seconds.)

What I am trying to do is make an invisible caster spawn every X seconds in correspondance with the level, and then remove the invisible caster and make the raised unit explode upon death in order to prevent abuse of this aura, though this spell seems to be a chaotic jumbled mess right now.. as I get too many casters spawned in such a short amount of time, regardless of level, and the triggers don't remove them all properly, ect... think you guys can help? I'll paste all parts of the trigger below.

Aura Activation
Unit - A unit Learns a skill
(Learned Hero Skill) Equal to Reanimation Aura
Set ReanimationHero = (Learning Hero)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Reanimation Aura for (Learning Hero)) Equal to 1
Then - Actions
Trigger - Turn on Unit Raise 1 <gen>
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Reanimation Aura for (Learning Hero)) Equal to 2
Then - Actions
Trigger - Turn on Unit Raise 2 <gen>
Trigger - Turn off Unit Raise 1 <gen>
Else - Actions
Do nothing

Ect. ect. ect, up to level 5

Unit Raise Level 1
Time - Every 25.00 seconds of game time
If ((ReanimationCaster is alive) Equal to True) then do (Unit - Create 1 ReanimationCaster for (Owner of ReanimationCaster) at (Position of ReanimationHero) facing Default building facing degrees) else do (Do nothing)
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Undead Crypt Lord - Carrion Scarabs
Wait 0.50 seconds

(Note: I based the unit raising spell off of Carrion Scarabs, which should explain above. Also, for each higher level, I just decrease the spawn time by -5.00 and copy the rest of the trigger (For example. Unit Raise Level 2 would be identical, but it would raise ever 20.00 seconds instead of every 25.00)

I hope it's not too daunting and confusing. I'd appreciate any help I could get though... thanks for reading.

- Lazurus
03-11-2004, 09:55 PM#3
ThyFlame
Add some comments throughout the trigger and increase the time between casting the spell and killing the unit to see if that happens to be a problem.

And you made the unit hidden... not sure you were going for that. (100% transparent)
03-11-2004, 10:00 PM#4
Lazurus
Yes, I wanted to spell to have the appearence of an aura, so I made the casting wisp dummy unit entirely invisible.

- Lazurus
03-12-2004, 04:44 PM#5
Lazurus
Sweet, I've gotten Reanimation Aura to work, (It turns out I wasn't giving the casters enough time to cast their spells before attempting to remove them, carrion beetles die if the caster dies, and I have all the spawning triggers on from the map's start.. how foolish of me. :P) now all I need to do is make the Warlord's War Cry Aura... here is what I am going for :

Nearby units under the effects of the aura (have the aura's buff) have a certain % chance of spawning an invisible caster upon death who will then cast some variation of war stomp or roar or something, but that part isn't important, since I am pretty sure I can get the last bit working on my own...

but like I mentioned earlier, I have a problem with dead / dying units and buffs, and then I'm not sure how to simulate the % chance of it going off... any advice?

- Lazurus
03-13-2004, 03:52 AM#6
Zethiros
Hi Lazarus, couldn't you set an integer/variable to a random number between 1 and 100, like every couple or so seconds (?) and have the effect happen--

OH, OH OH *light bulb*!
Can't you have a trigger that detects when a unit dies, if that unit has your aura's buff, then have a special effect (warstomp) play at the dying units location, then set all units within a 100 radius of the dying unit to Life of Picked Unit - 50/100/150 (per level?) ect.?
That sounds like it'd work, oh but wait... you needed a % mechanism? Pfft... just insert a "Set integer/variable to a random number between 1 and 100" thing in there (so it resets each time a unit dies), then have 2 If/Then/Else functions that check if the variable/integer is equal to your number, execute the rest of the effects, and the other If/Then/Else function state if the variable/integer ISN'T equal to your number, then it won't do anything.

Wow... I need to recap, don't I? =D
I'll do this from the top of my head, bear with me as I'm not in the editor!
(Btw, use [.code][/code] tags to put your triggers in, it's a LOT easier to read that way [don't leave the "." before "code", though])

Code:
Trigger1
Events - A unit dies

Conditions - Unit has "your buff" equal to true     ///not sure if there is a boolean check for this, actually...\\\

Actions - Set "integer variable" to a random number between 1 and 100
If/Then/Else -
   If - "integer variable" is equal to "x number"
   Then - Create a special effect at position of dying unit using x/x/warstomp
   Then - Pick every unit in 100 radius/feet of position of dying unit and do multiple actions:
           Actions - Set Life of Picked Unit to Life of Picked unit - "x number"
    Else - Do nothing

///Actually, I don't think you even need this second If/Then/Else, try it with just the first and if it doesn't work, add this one, although I don't know what you'd need it for\\\

If/Then/Else -
   If - "integer variable" is not equal to "x number"
   Then - Do nothing
   Else - Do nothing

The text inside the /// and \\\ are little notes I placed =)!
Hope that helps, Lazarus.
-Edit, with my way you probably won't even NEED dummy caster units (which is always a good thing).
03-13-2004, 05:15 PM#7
Lazurus
No luck Zethiros, I don't think there is a way to detect whether or not a dead unit has a buff... I'll try allowing the aura to target dead units and see if that works, i'll get back to you soon.

- Lazurus
03-13-2004, 05:16 PM#8
ThyFlame
Quote:
Originally Posted by Lazurus
No luck Zethiros, I don't think there is a way to detect whether or not a dead unit has a buff... I'll try allowing the aura to target dead units and see if that works, i'll get back to you soon.
- Lazurus

Parasite comes to mind...
03-13-2004, 05:53 PM#9
dataangel
ThyFlame, there's no reason to insert waits to see if that'll get it to work. I haven't seen any functions that only work with a wait between them. Is there something specific you're thinking of?
03-13-2004, 06:30 PM#10
weaaddar
Dataangel there are times when a wait is neccessary (or a timer of zero). But thats generally for stupid things like actions which fire before events.
03-13-2004, 09:38 PM#11
ThyFlame
er... when did i mention waits?
03-13-2004, 10:29 PM#12
Zethiros
Quote:
Originally Posted by Lazurus
No luck Zethiros, I don't think there is a way to detect whether or not a dead unit has a buff... I'll try allowing the aura to target dead units and see if that works, i'll get back to you soon.

- Lazurus

:( Sorry then...

Oh, wait... there may be a way! I'm not in the editor, but you may want to use the trigger I suggested with a different condition, maybe "Dying unit is within range of 'your hero'"? You could also attach a special region that's as large as the aura's radius, and have a condition "Dying unit is in 'aura region' equal to true".
I know the second exists, and it sounds like it would work.

Good luck. ;)