[Solved] Need help with Salvaging buildings

ryanradnell

New Member
Hi, i'm currently working on a tower defense and i'm trying to put in the salvage ability for towers (using the bunker salvage as reference). However when i use the ability all it does is start the 5 second countdown and nothing afterward (Doesn't destroy building), I've checked over and over and it's exactly like the bunker salvage is, can anyone help?
 
Last edited:

X-maul

AKA: Demtrod
I assume you want to destroy the unit and get back the resources spend. What you should do, is to use a trigger that activates when the spell is finished casting, giving the mineral and vespene gas cost of unit type of triggering unit to the owner.

The spell should be a no target spell (forgot the name), with the effect set to the effect "Suicide" and the cast time set to whatever you want it to be.

Hopefully this makes sense.

If you do not want to use triggers, you can make an effect that gives a resource to the player (take a look at minerals that you pick up in campaign), but that will need a unique effect for each different unit using the ability.
 

ryanradnell

New Member
I don't fully understand what you're trying to say, but perhaps i can elaborate a little on what i'm trying to do, I've already setup triggers to refund the costs which works. I was copying the Salvage Bunker ability to do the countdown and destroy the building, but the building doesn't get destroyed after the countdown and i cant find out why.
 

Dave312

Censored for your safe viewing
On your salvage ability there should be an "Effect" property. Make sure this is set to a damage effect that will kill your unit. There are a few existing ones you can use such as "Salvage - Salvage Death" or you could just make your own. If your making your own, make sure the Kill flag is checked in the "Effect: Flags" property and "Target: Impact Location" is set to "Source Unit" (or "Caster Unit" will work too) on the damage effect.
 

ryanradnell

New Member
On your salvage ability there should be an "Effect" property. Make sure this is set to a damage effect that will kill your unit. There are a few existing ones you can use such as "Salvage - Salvage Death" or you could just make your own. If your making your own, make sure the Kill flag is checked in the "Effect: Flags" property and "Target: Impact Location" is set to "Source Unit" (or "Caster Unit" will work too) on the damage effect.
It's weird that the unit dies when using the original Bunker Salvage (Refund) ability, but with my duplicated one it wouldn't destroy the unit, though it could have been that i didn't set the ability after duplicating it i can't remember. But thank you for your response, i decided to not duplicate the bunker salvage and it seems to work.
 

X-maul

AKA: Demtrod
It might be that, when you dublicated it, it somehow set the effect to something unknown, making it not work. Anyway glad you made it work :) I did not have the editor installed so I had to tap from my memory ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    they got a server engineer job opening :)
  • Ghan Ghan:
    I really do not want to move to California otherwise I might consider it.
  • The Helper The Helper:
    yeah California is not anywhere you really want to live
  • The Helper The Helper:
    That is why I did not take the job Blizzard offered me back in the day, there is no way I could have moved my family there on what they were offering, not even close and that was like 20 years ago
  • The Helper The Helper:
    yeah they wanted me on the tech support team when they did not get me they got one of the next MVPs in Dinobot
  • The Helper The Helper:
    Dinobot was one of the youngest of the MVPs tkron probably could have worked for Blizzard but he had a good job in Chicago doing business programming already
  • The Helper The Helper:
    Dinobot probably still works for Blizzard would love to reconnect with that guy
  • The Helper The Helper:
    I wonder what ever happened to Wargasm?
  • The Helper The Helper:
    This new version of Xenforo really is awesome
  • Ghan Ghan:
    Wargasm is still around. He works for the domain registrar where thehelper.net is kept.
  • Varine Varine:
    Is sqrage still around?
  • The Helper The Helper:
    I have not seen him on lately the forum says he was last on 2 years ago
  • The Helper The Helper:
    How are you doing Varine have not seen you around in a minute
  • thewrongvine thewrongvine:
    lol I live in CA
  • thewrongvine thewrongvine:
    I've got some friends in animation department who have been applying for Blizzard, doing interviews and such. They said the workplace seems nice, though now it'd be all remote work I suppose
  • The Helper The Helper:
    good for them I live close to Austin and am trying to get my kids interested in getting into Games but not having much luck. I would never let them move to Cali.
  • The Helper The Helper:
    unless it was huge money
  • The Helper The Helper:
    and even then with the taxes I really could never let them move there

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top