q-tree= Quad tree => qtree wiki
It basically indexes points by location in trees. if 4 or more points are on one tree it splits into 4 trees. if four or more points are on any of those it splits again. This way, when you want to do collision detection you can get all the points in the top tree...
yeah im only asking because im wanted to make text macros for functions so they could be easily inlined, however its annoying to do when keeping locals so I wanted to use globals lol. plus most of the things im manipulating are reals and integers
okay i see. So if a function is running and a timer fires off, when does warcraft 3 go to the callback of the timer? after the function is completed? or is there some special case like TriggerEvaluate or TriggerExecute or something else?
Thanks for the info guys.
Ver 1.1 is here!
This is a major/minor update. Its major in that its a big leap from ver 1. But minor in that there are still a lot of improvements I plan on making.
Changes-
Broke backwards compatability but I don't think thats a big deal because no one uses...
Yeah I haven't done much with struct arrays, but ill check it out.
Yeah its basically a b-tree the only difference being that leaves can stack if necessary but nodes that point to other qtrees have a max of 4 children. Why?
because it makes the split method easy =] but also because I don't see...
<--- yeah Weep is right. There were units in the way. But it was weird. Some units would stack on top but in other cases it would be shifted off by like 1.
Okay, I feel unloved because no ones posting any comments =[
But here are some stats that might make people happy =]
With my newest ver(which I haven't posted yet because I'm still looking for improvements),
This is with no units being created, everything is emulated by the code.
O(n^2)...
idk exactly what the problem was but createunit(...x,y...) did not put the unit in the same position as that and setting the unit's x and y afterwards.
Question: Could you possibly make it so that the engine calls a static function per tick, that way instead of having to do certain tasks every instance every tick we can do it just once per tick. (For example, I need to get the x and y location of a specific unit and dont want to call GetUnitX&Y...
How exactly does real division and addition work?
By that i mean how accurate is it? and when you call createUnit(...x,y...) are those integers?
also if you do real/2 does that return an integer or real? is it more accurate using real/2.0?\
EDIT: Nevermind!! CreateUnit is a little weird. Doesnt...
QTree v1.1
Uses: vJass
Testmap uses: T32
How to Import:
1)Create trigger called Qtree.
2)Convert to custom code.
3)Paste the code from here.
Description:
The Qtree is a way to index points by location. When you add a node it adds it to the tree. if you have more than n-leaves, it...
Hellooo. Making a Qtree implementation. And I canNOT figure out what is wrong with the implementation. unfortunately its really annoying to debug so I was wondering if anyone can spot whats wrong with it? It gets buggy when it collapses. Although, there could be other bugs in it.
This code...
Blade Masters Big Entry
MUI
vJASS
Requires:
T32, AutoFly
Description:
Blademaster calls down pole for him to jump off of. He rushes up to it,jumps on, rides the momentum, and jumps off of it with such power it pushes the pole right into the ground and, vice versa, him straight into the sky. He...