Debris for doodads

joaoac

Active Member
Reaction score
11
Oh, I tried search (learnt to allways do that, before ask on a new thread) and found nothing.

I have units as doodads models (wells, houses, etc.).
The point is that when they die, don't leave debris (debris is that desctructed stuff on the ground, right?) and don't have dying animations.
For the animations, ok, but how can I make them make debris.

If it's by triggers, I don't have any idea on how to code this.

Thanks in advance.
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
It's because the doodads don't have any animations, they are just static models. Bought the best you can do is when it dies, remove it from game and play a special effect of an explosion or something at the point of death
 

Sajberhippie

New Member
Reaction score
30
This MAY be a way to solve it. Haven't tried it, but in my mind it should work. Somebody please correct me if it don't.

Create a unit called "debris" or whatever, with the model of the debris you want (perhaps ruined building?). Set it to locust and all other things that a dummy unit has except it should have a graphic. Then, use this trigger:

Code:
Debris
    Events
        Destructible - A destructible within (Playable map area) dies
    Conditions
        (Destructible-type of (Dying destructible)) Equal to YOUR DESTRUCTIBLE-TYPE
    Actions
        Unit - Create 1 "debris" for Neutral Passive at (Position of (Dying destructible)) facing Default building facing degrees
        Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
This should do the trick.
 

joaoac

Active Member
Reaction score
11
The code I made, based of your tips.
Code:
Well of Water dies
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Well of Fresh Water
    Actions
        Special Effect - Create a special effect at (Position of (Triggering unit)) using abilities\weapons\DemolisherMissile\DemolisherMissile.mdl
        Wait 1.00 seconds
        Unit - Remove (Triggering unit) from the game
        Special Effect - Destroy (Last created special effect)

Thanks Sajberhippie and MurderMode.
AdamGriffith, no it doesn't matter.

I couldn't find the building death's animation (explosion, woods on fire, etc,) so I used demolisher's missile. If someone can help me to find that, I ll be glad.
Thanks again!
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl

ok with your trigger, I'm not sure... but there may be instances where it doesn't work.

The reason I think this is because if 2 wells die on the map before the 1 second wait is up, then the first one destroyed won't be removed. (this is because the dying units id will be changed to that of the new dying unit, and it will complete the trigger in place of the first one.)

I might be wrong about that however, because using triggering unit like you have might be a solid way of doing it. You should just test it out incase, or get someone who has good knowledge of leaks just to check it out for you.
 

Andyoyo

TH.net Regular
Reaction score
22
yeah just use a custom unit & change its model file to the doodad you want. Also make sure it is neutral so you won't auto-target it as an enemy :D
 

joaoac

Active Member
Reaction score
11
Murdermode, sure it can do errors. It's not finished. I ll get an eye at your said.
I tested only for 1 player.
This unit is intended to be for 1 player's RPG. But if it grows for multi-player, it's better take care of the tweaks.
Thanks again.

Andyoyo, what are talking about dude?
 

vypur85

Hibernate
Reaction score
803
Code:
Well of Water dies
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Well of Fresh Water
    Actions
        Special Effect - Create a special effect at (Position of (Triggering unit)) using abilities\weapons\DemolisherMissile\DemolisherMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Wait 1.00 seconds
        [B]Unit - Remove (Triggering unit) from the game[/B]

Destroy the effect immediately after use if possible. The trigger above is MUI. Anyway, you can remove the bolded line if you want to. Just change the unit's Art - Death time (forgot the exact name) to 1.0 second and make it does not decay. Not too sure if it would work though. Else just use the above trigger.
 

MurderMode

Giving new meaning to co-op... slowly
Reaction score
154
Ok, I think I have thought up a more efficient way to do it.

When your doodad building dies, remove that unit from the game and create a new human structure unit for nuetral passive at the point of the triggering unit, then instantly kill it. It will play the death animation for the human structure right after the well of water dies :D

Code:
Doodad Explosion
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Well of Water
    Actions
        Unit - Remove (Triggering unit) from the game
        Unit - Create 1 Cannon Tower for Nuetral Passive at (Position of (Triggering unit)) facing (Position of (Triggering unit))
        Unit - Kill (Last created unit)

I really think this will work better then using waits and adding special effects
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top