1. The long-awaited results for Concept Art Contest #11 have finally been released!
    Dismiss Notice
  2. Join Texturing Contest #30 now in a legendary battle of mythological creatures!
    Dismiss Notice
  3. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  4. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  5. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice

Remove props?

Discussion in 'World Editor Help Zone' started by freakbox, Jan 13, 2019.

  1. freakbox

    freakbox

    Joined:
    Jan 13, 2019
    Messages:
    3
    Resources:
    0
    Resources:
    0
    Hello everyone.
    So my question is the following, is there a way to remove props through triggers? I don't mean regular destructibles such as trees or crates, I'm talking about stacks of hay, bones on the ground, etc.
    Thank you
     
  2. freakbox

    freakbox

    Joined:
    Jan 13, 2019
    Messages:
    3
    Resources:
    0
    Resources:
    0
    Bump.
    Halp
     
  3. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    288
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    The short answer is that there's not really a way to do this, at least as far as I know.

    The slightly longer answer is that you can sort of do this, but only if the props have a "death" animation.

    Unfortunately, JASS does not expose any APIs to directly manipulate doodads, like, at all. The only exception to this are 2 natives:
    Code (vJASS):

    native SetDoodadAnimation takes real x, real y, real radius, integer doodadID, boolean nearestOnly, string animName, boolean animRandom returns nothing
    native SetDoodadAnimationRect takes rect r, integer doodadID, string animName, boolean animRandom returns nothing
     

    The GUI equivalent would be this:
    • Animation - Play the death animation for all doodads of type Camera Prop within (Playable map area)


    If your props have a death animation, you may be able to hide them using this, however, I believe that it will not affect the pathing.
     
  4. Halithor

    Halithor

    Joined:
    May 29, 2008
    Messages:
    22
    Resources:
    0
    Resources:
    0
    Instead of using props, you could use a destructible. There's a number of triggers dealing with removing destructibles and the appearance of a destructible can be very similar to a prop.
     
  5. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    93
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Change the model file of a unit to be the prop you want, give it locust and movement type none, and remove all other properties that makes it able to move, be damaged, damage, be selected and so on.

    Then you just do remove unit.
     
  6. Hermit

    Hermit

    Joined:
    May 29, 2013
    Messages:
    1,057
    Resources:
    2
    Models:
    1
    Icons:
    1
    Resources:
    2
    What about fog of war? Doodads in explored areas stay visible, but units don't.
     
  7. FeelsGoodMan

    FeelsGoodMan

    Joined:
    Dec 13, 2018
    Messages:
    93
    Resources:
    1
    Maps:
    1
    Resources:
    1
    According to the OP this was only for stacks of hay and bones, which I considered insignificant. For large doodads etc I wouldn't give the same advice.
     
  8. freakbox

    freakbox

    Joined:
    Jan 13, 2019
    Messages:
    3
    Resources:
    0
    Resources:
    0
    Well after doing a bit of research and trying pretty much every trigger in the editor, I've simply created my own destructibles using the props models.
    You see, what I want is to be able to change what the map looks like as the game progresses, this includes not just deleting buildings and units but also props and thus spawning different buildings, units, and props, which is why simply hiding these props would be no good, I actually need the pathing to be available.
    Thanks everyone for the replies
     
  9. Fang

    Fang

    Joined:
    Oct 3, 2014
    Messages:
    434
    Resources:
    1
    Maps:
    1
    Resources:
    1
    you can hide doodads in the trigger:
    • Animation - Play the hide animation for doodad in rect