HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What's wrong with this trigger?

06-09-2003, 07:41 AM#1
Arche
Event:

Unit - A unit comes within 450.00 of Ghoul King 0000 <gen>

Cond:

((Triggering unit)is dead) Equal to True

Actions:

Special Effect - Create a special effect attached to the origin of (triggering unit) using
Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl

Unit - Replace (triggering unit) with a Skeleton Warrior using the new unit's maximum life and mana

Unit - Change ownership of (Last replaced unit) to Player 1 (Red) and Change Color

Wait 0.50 seconds

Special Effect - Destroy (Last created special effect)
06-09-2003, 07:46 AM#2
Guest
Why dont you just give tha ghoul king the ability Raise Dead?
If you dont want the ability to use any mana just edit it with a spell editor:D
06-09-2003, 09:21 AM#3
Milkman
a unit cant come into range when dead right? that might be the problem... instead check if there's any dead units in 450 radius if the ghoul at a reguklar time
06-09-2003, 10:03 AM#4
Arche
As for giving him a raise dead spell - that is out of the question. The ghoul king has an aura which raises dead not a spell :)

As for the other thing.. I will try it with a 2 seconds basis, and get back to it.
06-09-2003, 12:10 PM#5
Vexorian
Event:
Timer - Periodic Event - Each 1 seconds

Conditions: None
Actions:
*Unit group - Clear Unit group - Clear (Dead)
*Pick every unit in radius 450 around Ghoul king 0000 And If unit is dead - Unit Group - Add (picked unit) to unit group (Dead) Else do nothing
*Pick Every unit in Dead and Special Effect - Create a special effect attached to the origin of (picked unit) using
Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
*Pick Every unit in Dead and Unit - Create 1 Skeleton Warrior for (Player 1 (red)) at position of (Picked unit) facing blah blah blah
*Pick Every unit in Dead and Unit - Remove Picked unit
06-09-2003, 01:13 PM#6
ChrydGod
Avoid these synthetical timed events.
Lets Say the owner of the goul king is Player X
I suppose it won't raise corpses of its own dead units

Use these event/condition :

Events :
Unit - A unit owned by Player1 (Red) Decays
(repeat with all players but Player X)

Conditions :
(Distance between (Position Of(Decaying Unit) and Position Of (Ghoul king 0000)) Less than or equal to 450.00

Actions
Special Effect - Create a special effect attached to the origin of (triggering unit) using
Abilities\Spells\Undead\RaiseSkeletonWarrior\Raise
Skeleton.mdl
Unit - Replace (Decaying unit) with a Skeleton Warrior using the new unit's maximum life and mana
Unit - Change ownership of (Last replaced unit) to Player X (Red) and Change Color


Note that the last lines of your actions won't work :
Wait 0.50 seconds
Special Effect - Destroy (Last created special effect)

This is because effects can be created while yor trigger sleeps for 0.5s

The only efficient way i know around this is to use custom text to store the special effect in a local variable before the trigger sleep action and then remove it after.

If not it will only remove the last created special effect, that can be very different from the Raise Skeleton sfx created before the wait.

Regards
06-09-2003, 01:33 PM#7
Vexorian
He is right a Decay Event works better

Edit: You don't need to destroy the effect as it is a temporal one.
06-09-2003, 01:46 PM#8
ChrydGod
This said, it is worth knowing this typical issue.

Many map makers forget about it.

I just though it would be useful ^^

Regards
06-09-2003, 04:51 PM#9
Ultramagnetic
*quirks a brow at this thread*

Ya know sometimes it just doesn't pay to even hint at your ideas in public...

http://www.wc3campaigns.com/forums/s...261#post175261


:bgrun:
06-09-2003, 08:34 PM#10
Earth-Fury
lol a major idea ripoff Arche. ;) be original, or dont be. no ofence on you, but, be original man.
06-09-2003, 08:35 PM#11
Arche
Yes, thank you everyone, but I have changed the spell so that every 3 seconds a dead unit that is not a skeleton warrior gets raised. Only one skeleton - note that. It works kind of alright.