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.
 
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
 
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.
 
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!
 
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.
 
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
 
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?
 
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.
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top