Warcraft III resources & community, 2003–2006 · archived

Help with special effects PLEASE READ AND RESPOND

12 posts
#1

Help with special effects PLEASE READ AND RESPOND

how do i make a special effect happen on a specific unit type not a specific unit when that unit is trained? i got it to happen on a specific unit that was there from the start of the game but never found a way to make it do unit types after it is trained. please help. thx :) .
#2
I'm no trigger genius, so this probly wont work but try something like this:
EVENTS: a unit is trained
CONDITIONS: (triggering unit) equal to [unit type]
ACTIONS: [run special effect] on (triggering unit)
#3
Good try, here a example-trigger that should work

Events
Unit - A unit Finishes training a unit
Conditions
(Unit-type of (Trained unit)) Equal to [Your Unit Type]
Actions
Special Effect - Create a special effect attached to the overhead of (Trained unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
#4
Events
Unit - A unit unit enters (everywhere)
Conditions
(Unit-type of (entering unit)) Equal to [Your Unit Type]
Actions
Special Effect - Create a special effect attached to the overhead of (Entering Unit) using (art model file)[/quote]
#5
DarkShadow's answer is better, Sopho's could run into a problem if you create units during the game at all.
#6
Yeah, I always use that trigger method
#7
So why did you post if you knew that his is a better way? You should just leave it if tehre already is a good answer.
#8
Yea, DarkShadows answer is alot better. Sopho, yours has to many bugs it could run into... like at map initiation if you have units placed already it wont count for them entering the region, so it would mess everything up.
#9
Uh, acolyteofdoom, DarkShadow's way won't account for preplaced units either.
#10
That won't be the problem, simply add one more event and condition for that...

Edit: I will edit the trigger above in some hours

Edit: OK, though there doesn't exist any event like
"Unit - A unit is replaced",
you'll need to add the special-effect in the replace-trigger.

e.g.

Actions
Unit - Replace (Triggering unit) with a [Unit] using The old unit's relative life and mana
Special Effect - Create a special effect attached to the overhead of (Last replaced unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
#11
Even better, just run at Map Initialization a trigger that picks every unit on the playable map area and checks if they are of the unit type that you want and attaches the special effect (I'm not at home so I can't test this, but it should work).[/code]
#12
Hrhr, yeah oz02, this works for units that are on the map at init, but he asked for a trigger that adds special-effects to trained units.

@ oz02 :P 3:1

oz02 is writing this-> I realize that, but everyone else was talking about it, so I was trying to clrify it for them - which means its back to 2:1 :P