System Rectwraps

Azlier

Old World Ghost
Reaction score
461
That code is long gone. Maybe I can scrape something together.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I will wait few weeks for your fix, i don't really have the need actually anyway, and if i remember correctly you can code only the week end, right ?

But if you need some help, feel free to ask me.
 

Trollvottel

never aging title
Reaction score
262
Wont the registerEnter function make problems if you change the size/shape/position of the rect after? as far as i know the triggerregisterenterrect functions are hardcoded so they take the coords of minxx/y and maxx/y and dont change when the rect changes?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Wont the registerEnter function make problems if you change the size/shape/position of the rect after? as far as i know the triggerregisterenterrect functions are hardcoded so they take the coords of minxx/y and maxx/y and dont change when the rect changes?

Don't confuse rect and regions.

Azlier said:
Last time i played with them, i thought we can edit the region (add/remove rect/cells), and the event handled theses changes.

That makes sense for me.

For example you can morph an unit, but the specific unit event will always fire.
I mean ok you can't change the region associated to the event to an other one, but i don't see why you couldn't edit this region.
But when you add a rect, i don't think it links the rect to the region, i mean it probably just adds the coordinates of the rect, and then if you edit the rect or even destroy it, the region isn't edited as well.
And i'm fairly sure it rounds up to use only 32*32 cells following this formula :

JASS:
32.0*R2I(<real x or y>/32.0)
 

Azlier

Old World Ghost
Reaction score
461
I remember playing with rects and the regions would actually change accordingly. Though I might just be crazy.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Be crazy is fine.

But be lazy is not an option.
Gogo fix it, or at least graveyard it until you haven't fix it.
 

Azlier

Old World Ghost
Reaction score
461
Alright. Update, I guess. Two more methods added, that region thing should be fixed.

It would be nice if someone tested the new isPointOn and isUnitOn methods.

Now, I'm off to steal Jesus4Lyf's documentation template which he in turn stole from Cohadar! Up, up, and away!
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
It seems you did it in the right way. (need to test it though, with my test code and some edits maybe ?)

But more tests are needed, for example what happens when an unit doesn't move, but suddenly a region under these feet is created, does the enter region event fire ?
 

Azlier

Old World Ghost
Reaction score
461
I would guess no. But if so, that doesn't affect rectwraps. I don't think.

That's more "study of rects and regions" area.

Hey, if it does fire, it's a new way to do GroupEnumUnitsInRect :p.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I'm a perfectionist and i would make this kind of tests before release a such code, but it's up to you.
Anyway i will test it myself if you don't soon.

Hey, if it does fire, it's a new way to do GroupEnumUnitsInRect.

Exactly.

We should also create a trigger and add a specific unit event to it, when an unit enter the map, instead of directly using a player-unit event. :p
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
I think the .wrap thing is bugged.

It kept setting maxX or minX to the wrong coordinate (it should be 2560 or something, but kept going -2560).
 

Azlier

Old World Ghost
Reaction score
461
Oh God. That's a horrible mistake I made in that method. There, fixed :p.

Nobody noticed because nobody needed the coordinate values yet (not even me :p).
 

Azlier

Old World Ghost
Reaction score
461
I finally overcame my laziness and fixed the replaceTerrain, setPathing, and iterateThrough methods. They are faster, safer, and cleaner than before.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Evaluate a trigger open a new thread as well as execute it , and since it is supposed to be faster use .evaluate instead of .execute ?
Also i'm pretty sure you miss few cells with the pathing method.

As far i remember it applies for 32*32 cells but the formula for finding which cell will be considered is R2I(X/32.)*32.
Where X can be the X and the Y of the coordinates.

I suppose i'm not clear at all, but i still can make a demo map if needed.
 

Azlier

Old World Ghost
Reaction score
461
.evaluate doesn't exactly get around the op limit for some reason. Only .execute managed to replace all the terrain in a 96x96 map.

>Also i'm pretty sure you miss few cells with the pathing method.

It missed cells before. So, no idea.

This one uses the native in the middle of the cell instead of the top left corner, where real inaccuracies might cause... strange happenings.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
.evaluate doesn't exactly get around the op limit for some reason. Only .execute managed to replace all the terrain in a 96x96 map.
Are you really sure about that, because at least inside an initializer ExecuteFunc,TriggerExecute and TriggerEvaluate get around the limit op.
I know many "respected" users assumed only .execute (and ofc ExecuteFunc) open a new thread, but i can say that is just-an-other-pseudo-fact-which-was-never-tested.

About the cells i did it like that :
http://www.wc3c.net/showthread.php?t=101317
 

Azlier

Old World Ghost
Reaction score
461
I'm positive. .evaluate filled merely 3/4 of the map, while doing nothing but replacing .evaluate with .execute caused it to fill the entire map.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Oh well, it's trickier, TriggerEvaluate opens a new thread or not depends the environment, i will do more tests and post samples codes and conclusions later. (in the jass forum i guess xD)
 

Azlier

Old World Ghost
Reaction score
461
So I'll keep .execute because it's guaranteed to start a new thread, then.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top