1. The mythological era has spawned some interesting characters around. Check them out and be sure to vote for them in the 30th Poll of the Texturing Contest.
    Dismiss Notice
  2. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  3. Hivers united and created a bunch of 2v2 melee maps. Vote for the best in our Melee Mapping Contest #4 - Poll!
    Dismiss Notice
  4. 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:
    312
    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:
    126
    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,086
    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:
    126
    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:
    445
    Resources:
    1
    Maps:
    1
    Resources:
    1
    you can hide doodads in the trigger:
    • Animation - Play the hide animation for doodad in rect