Best way to add a buff special effect to an unit?

McLovin

New Member
Reaction score
1
Hi!

There are some times units in my map that spawn for 12 seconds and then explode. I'd like to add a buff special effect to them (Environment\LargeBuildingFire\LargeBuildingFire1.mdl) and was wondering what's the best way to do so?

When I just add the effect to them every time they spawn then the trigger would leak, so I need to destroy it. When I destroy the effect right after its creation, then it only lasts for a second and not until the unit is dead. When I put a wait between the creation and destruction of the effect, then it gets messed up with other special effect triggers.

What's the best way to solve this problem?

Regards,

McLovin
 

Accname

2D-Graphics enthusiast
Reaction score
1,465
copy the human ability sphere and change the animation attachement to you animation, change the attachment points to the points you want and add the ability to your spawns. Either in object editor or via script.
the Sphere ability does absolutly nothing but shows some animations.
 

neckface

terrain contest winner! :) dance contest loser. :(
Reaction score
34
@ Accname: Have you tested that? It really works? If so you became my hero of the day! :D

@ OP: Here are two other more labor intensive possiblities that I've used:

1. Store the special effects as variables, then you can wait as long as you want before destroying them

2. If it doesn't need an attachment point, create a dummy unit using your special effect model with the appropriate expiration timer. make sure you give your fx unit the invulnerable and ghost abilities (not locust, coz then you wouldnt see it!).
 

vypur85

Hibernate
Reaction score
803
You can use the method in Post#2. Or...

You can just base it off an ability. Errr... For example, Unholy Frenzy. Make it do nothing (no damage and attack speed gain). Then, when the unit which you want to have the effect on is being created, just create another dummy and order it to cast Unholy Frenzy on the spawned unit. Now, you need to edit the buff to have the (Environment\LargeBuildingFire\LargeBuildingFire1.mdl) effect on the 'Art - Target'. Then, set the duration of the Unholy Frenzy to 12 seconds.

But of course, the Sphere way is much simpler in your case. The dummy spell method is good if you want the unit to have the effect at specific duration.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
hmm
you can use item abilities like armor bonus or such and make them have 0 bonus then just add special effects and give that ability to your unit
 

Curo

Why am I still playing this game...?
Reaction score
109
hmm
you can use item abilities like armor bonus or such and make them have 0 bonus then just add special effects and give that ability to your unit

Yep, that's the same suggestion as the Sphere one. Although, I heard that Sphere is for projectiles. Basically you are going to want to make a new custom ability based off the Armor Bonus +1 (or w/e) item ability. Change the armor bonus field to 0, so effectively the ability will do nothing. Then you want to change the target art/effect (sorry, don't know the exact name of the field) field to have your fire effect, and attach it at the origin. This will now act like a "piece of clothing" per say on any unit that has your new custom ability (if you like wearing fire and that kind of stuff). Just to clarify :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top