1. The 3rd Melee Mapping Contest is ON! Join in on a ride of a 4v4 melee experience!
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice
  4. The Aftermath has been revealed! Choose which entry should win in the 19th Terraining Contest Poll.
    Dismiss Notice

Remove props?

Discussion in 'World Editor Help Zone' started by freakbox, Jan 13, 2019 at 9:45 AM.

  1. freakbox

    freakbox

    Joined:
    Sunday
    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:
    Sunday
    Messages:
    3
    Resources:
    0
    Resources:
    0
  3. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    242
    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:
    19
    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:
    45
    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:
    916
    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:
    45
    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:
    Sunday
    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