- Joined
- Jul 10, 2007
- Messages
- 6,306
But then you have masses of overhead on the creation/destruction of units...
This was tested by mag I think.
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.
This would make IsPathable ~2x faster if it works
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.The thing is IssuePointOrder will return false in the case of bad pathing.
Alternatively you could probably get away with the "inferno" point-order trick
Read the disclaimer next time, and stop trolling with your "case closed" egotism.
SetUnitPosition
function by the War3 Engine's pathing/collision system.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 toSetUnitPosition
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.
ScorpioT1000 said:CreateUnit is faster
// 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)
Prove it with tests please =)
> CreateUnit will run UnitIndexer events
This is third party problem ...