• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[General] Angle of Destructible

Status
Not open for further replies.
Level 7
Joined
Feb 9, 2021
Messages
301
I have a spell "wall", which creates a 10x1 path blocker. How I can set its angle on creation? I tried putting my angle into real face value but does not seem to change it. However, if I try to put a barricade as a model for the blocker and the direction of the barricade is correct, while the path blocker is not. It seems like the rotation of a blocker is fixed for some reason.

P.S. I made a custom pathblocker (texture)
 
Last edited:
Level 7
Joined
Feb 9, 2021
Messages
301
it might be easier to just use a bunch of little pathing blockers and dynamically calculate the angle from the hero that they need to be at.
My rational was that it is more efficient to create and delete 1 pathing blocker than 5
 
Level 25
Joined
Mar 29, 2020
Messages
1,465
might be slightly more efficient, but unless you are spamming these in mass I doubt it's much of a difference. If this is for a spell or something like that I would just go with the simple solution without trying to fight with blizzard hardcoding.

also, having you calculate and place a lot of smaller pathing blockers will make this a lot more flexible and scalable which is always nice.
 
Level 7
Joined
Feb 9, 2021
Messages
301
might be slightly more efficient, but unless you are spamming these in mass I doubt it's much of a difference. If this is for a spell or something like that I would just go with the simple solution without trying to fight with blizzard hardcoding.

also, having you calculate and place a lot of smaller pathing blockers will make this a lot more flexible and scalable which is always nice.
Another problem is that verticle wall blocks in a weird way because textures do not turn. Is there no way around it at all?
1646250421373.png


Blockers are 2x2. My code:
JASS:
            local real mFacing      = GetUnitFacing(missile.dummy)
            local real dest1X       = GetXWithOffset(Spell.targetX, 32, mFacing - 90)
            local real dest1Y       = GetYWithOffset(Spell.targetY, 32, mFacing - 90)
            local real dest2X       = GetXWithOffset(Spell.targetX, 64, mFacing - 90)
            local real dest2Y       = GetYWithOffset(Spell.targetY, 64, mFacing - 90)
            local real dest3X       = GetXWithOffset(Spell.targetX, 32, mFacing + 90)
            local real dest3Y       = GetYWithOffset(Spell.targetY, 32, mFacing + 90)
            local real dest4X       = GetXWithOffset(Spell.targetX, 64, mFacing + 90)
            local real dest4Y       = GetYWithOffset(Spell.targetY, 64, mFacing + 90)

            set missile.destruct    = CreateDestructable(BLOCKER_ID, Spell.targetX, Spell.targetY, mFacing , 1, 0)
            set missile.destruct1   = CreateDestructable(BLOCKER_ID, dest1X, dest1Y, mFacing , 1, 0)
            set missile.destruct2   = CreateDestructable(BLOCKER_ID, dest2X, dest2Y, mFacing , 1, 0)
            set missile.destruct3   = CreateDestructable(BLOCKER_ID, dest3X, dest3Y, mFacing , 1, 0)
            set missile.destruct4   = CreateDestructable(BLOCKER_ID, dest4X, dest4Y, mFacing , 1, 0)
 
Last edited:
Status
Not open for further replies.
Top