• 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.

[Snippet] Is Pathable

This was tested by mag I think.

It was? This "mag" you speak of sounds handsome and dashing. <3

There's just a dummy unit, and it has a custom inferno ability with 4 levels (different collision sizes for each summon). I order him to cast to a certain point, and if the IssuePointOrder returns false that means that that point is not pathable for that specific collision size. And it works. The only thing is that it ignores trees, but you could most likely get the same result with a Pocket Factory which would not ignore trees.

Sounds like a nice idea.
I wonder if there are any cons. :eek:
This would make IsPathable ~2x faster if it works.

edit
Oh, Nes posted while I was typing :p
Couldn't we order the dummy unit to stop afterwards? :eek:
 
Bribe, your idea fails.. it only checks for unit obstructions and terrain *walkability*. Your idea will fail with pathing blockers.


I suggest you fix your knockback sys accordingly ; ).


And yes, I tested Inferno as well and it failed in the same scenarios, meaning that your knockback system is currently buggy.

edit
The thing is IssuePointOrder will return false in the case of bad pathing.
Furthermore, I decided to test the ordering idea since you so fervently claim that it works. Well, guess what, it doesn't. It does exactly whoever said it would do.. the unit is ordered, then the unit is ordered to stop.. the order returns as a success -.-... I completed blocked the unit off so it couldn't move and ordered it and got the message "Success," meaning that the order returned true. Furthermore, I tried ordering it in game, and sure enough, the little moving icon was highlighted and then the stop icon was highlighted, meaning that it tried to move and then was ordered to stop.

My suggestion... don't defend your claim unless you've actually seen it work ;p.

Btw, guessing you might have meant that the unit order fails when it is on bad pathing rather than blocked by bad pathing, I covered the unit in towers. It has always been my experience that when the unit is on bad pathing and it is ordered, it will instantly jump to the nearest good pathing. I tried ordering it and guess what happened? It jumped and the order returned true.

I also tried order the unit to its current position (the bad pathing position) and it still jumped and the order still returned true.

You have this habit of saying something is true w/o ever seeing for yourself if it's true... and then you continue to say what you say is true until someone proves you wrong... I don't much appreciate your philosophy of, "I'm right until you prove me wrong."


Idea for using Pocket Factory: Rejected
Idea for using Inferno: Rejected
Idea for using Orders: Rejected

Case closed.
 
Last edited:
Read the disclaimer next time, and stop trolling with your "case closed" egotism.

Ah, I was just assuming that you were assuming that it worked ; P, my bad ;D.

edit
was just in a very bad mood after spending time changing IsPathable to work with all of the suggestions and finding out that none of those suggestions worked ;p.
 
That doesn't mean anything, two floats can still be equal.

An epsilon is not needed in this context because the path check requires that the floats be exactly identical, meaning no modification is done to the coordinates passed to SetUnitPosition function by the War3 Engine's pathing/collision system.

Hence the equality operator.

If he used an epsilon, this would be an invalid pathing check.
 
Level 5
Joined
Jun 26, 2013
Messages
49
That doesn't mean anything, two floats can still be equal.

An epsilon is not needed in this context because the path check requires that the floats be exactly identical, meaning no modification is done to the coordinates passed to SetUnitPosition function by the War3 Engine's pathing/collision system.

Hence the equality operator.

If he used an epsilon, this would be an invalid pathing check.

SetUnitPosition (btw VERY FK SLOW FUNCTION, kills the big system already on 0.08 period) doesn't "just set coords", the passed x,y are just assumed coordinates to place unit, not the final. There are many checks and corrections before placing unit on the map.
 
SetUnitPosition (btw VERY FK SLOW FUNCTION, kills the big system already on 0.08 period) doesn't "just set coords", the passed x,y are just assumed coordinates to place unit, not the final. There are many checks and corrections before placing unit on the map.

The corrections are only done when needed.
(If the area around the position passed in with a radius equal to the collision radius of the unit is unpathable, the coordinates are corrected)
When they are not corrected, the point is pathable (The floats need to be exactly identical)

ScorpioT1000 said:
CreateUnit is faster

It's counter-intuitive that creating a unit would have less overhead because internally, I'd expect that they still have to do the same checks that SetUnitPosition does upon creating the unit to make sure it's placed properly.

Code:
// It appears that in the most minimal form, CreateUnit has 1 less character.
// This shouldn't affect the JASS interpreter very much however, so we can ignore 
// speed differences that have to do with the VM running JASS.
CreateUnit(a,b,c,d,e)
SetUnitPosition(a,b,c)

As for the implementations, I wouldn't know.

Benchmarks are called for at this point.

So. Who's willing to do them? :3
(I don't have Warcraft III or a World Editor at the moment, so I can't test anything for real)
 
Prove it with tests please =)

> CreateUnit will run UnitIndexer events
This is third party problem ...

Many of us have worked with created units being extremely hard calls. SetUnitPosition, which I have used extensively, doesn't lag my Atom N450 even with a hundred calls per second. CreateUnit will lag after even a dozen calls, and worse if they happen in the same thread. A hundred CreateUnit calls delays my whole game by 2-3 seconds.

If you need to convince yourself, set up a benchmark. But don't expect us to go on a wild goose chase proving or disproving your hypotheses.
 
Top