As DSG specified: complex objects (handles, agents, and their derivatives) do need to be cleaned. Primitives (real, int, bool, string) do not. To this end I should have added a Custom script: set udg_unit = null at the end of the trigger as well to properly avoid the reference leak of the locally shadowed unit variable.
Yeah, I knew the thing about primitives, but what I didn't understand was why nobody told him to null the local unit, since this forum is usually quite militant about pointing out leaks, but if that actually DOES leak, then I get it. I just assumed that it didn't, since nobody was pointing it out, which is why I was asking.
The accuracy is not the problem, and using a wait in a loop will not cause any sync errors.
I am not talking about game sync in the technical sense, but game design sync in an abstract sense. Say that you want certain events to happen within very accurate intervals in your map, having loops blasting through short waits, will cause this to start getting a bit fussy. I had great issues with this in a map where I wanted 12 players to have a more or less identical and syncronized experience in 12 different locations, but I ended up having to use a periodic event loop to achieve the proper accuracy instead.
A wait under the minimum threshold of ~0.27s will not be 'accurate' to the time you told it to wait but that's not an issue with loops but rather with Wait itself.
Semantics, but yeah, technically it's the wait. The issue compounds when it's used in rapid succession though, which loops would be a great example of.
No that's it. There's no "can of worms" involved here, just logically following through everything that would happen when you use a wait command inside a loop.
I really wouldn't know, I myself had a really odd issue with a loop once, that couldn't be explained by a variable conflict. I solved it by queuing actions outside of the loop instead of relying on the loop itself to offset with the wait (which was 2 seconds), but I went through a lot of hoops to try to keep it inside that loop, without luck.
Maybe I just didn't know what the hell I was doing wrong, but I tried more or less every solution I could find, without luck. To me, that at the very least shows some form of instabillity, that I'd prefer to work around as a general practise. That's what the take-away from the first part of my message was: "This stuff has some issues, but there's a less error-prone way to go about it." That's all. You take it as if it was some clause in a legal document.
First off I would like you to specify what exactly you see as me attacking you in a strawman argument
The strawman would be you basing your retort on the assumption that I didn't understand the concept of variable conflicts, when what I actually said, was that I wasn't aware of the full extent of issues related to using wait inside of a loop.
"Use your brain" might be unkind but it's not an attack, nor is it venting viciously at you. I didn't call you stupid or belittle you as you claim; I suggested that the answers should be obvious if you thought through the issue at hand...
Not only was this, once again, based on a total assumption (which was wrong) on your part, you are also in no position to dictate how others perceive your actions. This isn't a court room, I am not trying to hold you accountable, I am telling you that I don't like the way that you are talking to me. There's no logical argument you can make against that, because it isn't a logical matter.
...instead of waving your hands and saying "I dunno why but people say this is bad". Second, you in particular do this thing where you show up in a thread and say something like "I have no idea about any of this stuff but if I had to guess..." before listing a bunch of bologna that is 50% related and 50% unrelated or untrue information. It bothers me and it likely leads the people you are trying to help astray or to chase red herrings. I can't stop you from doing this but I can correct it, which I often do.
Given the absence of a concrete answer, I am offering suggestions for angles that people can use to diagnose the issue, as well as the methods that they can use to quickly debug it themselves. Sure, I could spend a few hours searching frantically to find the information on par with what you've build up in your 12 years of roaminig around this forum, and then spoonfeed him the answer. That'd be ideal, wouldn't it? But it's not always the case, nor does it improve his ability to test his own code in the future. You like to go to great lengths to explain the exact mechanics to people, and kudos for that. You are a real asset to this community for doing so. But personally, I like to teach people some basics for problem-solving instead. Then based on the responses to the tests people run, I can often piece together the cause of the issue from that, and offer up a functional solution. From that exchange, not only do I show people a process to finding issues and devising solutions, I also learn something about the mechanics of the game myself.
Hell, sometimes I can see the issue at first glance, and then I just offer it up instead. I've done that multiple times as well. But stating that I shouldn't be allowed to offer up advice for problem diagnostics, because the only acceptable response is to offer up a full service-desk guidance, is quite opinionated of you. I make it a great point to clearly state whenever something is solid information, and when I'm just spitballing an approach to narrowing down on the issue. This isn't the easiest or quickest way to go about solving an issue, but if noone offers a surefire answer, it's a good way to get the ball rolling.
This thread is a great example of your common "it seems like doing X is bad" statement where you fail to actually expand on:
- What exactly is happening in X
I didn't fail to expand on it. I clearly stated that I didn't know X exactly, and offered a possible explanation, as well as an approach to testing that explanation, as well as what was essentially an execution log for the loop itself, to catch issues like variable conflicts. You seem to skip over that part quite readily.
The premise here is that I'd know the exact answer to X in the first place.
- Why one should do Y instead of X
Once again, the premise is that I know the exact answer to X.
Not only did I actually do this, but OP actually started working on an implementation of it as a result of my post.
I didn't wanna write out a complete guide or answer to it, because this forum has plenty of guides, and I wouldn't know how much OP would be able to do for himself. Turns out, he was actually able to start working on that solution himself, so I'd say that taught him a lot more than copy-pasting a ready solution, as well as saving me time that I would have spent doing it for him. If he didn't have the first idea how to implement the solution I suggested, he'd be free to say that, and then I'd point him in the direction of the information or even help him out, but why would I waste time doing that on the assumption that he couldn't do it himself?
Just stop for a second and think about why X seems to be discouraged. For what reason might it be a poor course of action? What effects are occurring?
I did. I knew that variable conflicts was an issue, as well as the accuracy of the timer presenting an issue at times. But I wasn't 100% sure about whether or not there was something other than this that I didn't know, so I decided to simply leave it at "I'm not sure, there's some issues with this that you can read about on this forum, but here's an alternative approach that I know will not suffer the same issues:"
That's not me "not thinking", that's me not wanting to research every possible angle to an issue for hours, finding threads dating back several years, accounting for issues that may have been patched since described in said old posts, and etc etc etc etc.... when I know full well that there's people like you and DSG who'd be able to spit the answer out at in a second. It's just not feasible for me to chase down the "X-road", when I might as well jump straight to "Y" and leave X to people who know more about it than me. What I tried communicating to him, was that there was issues with X, that I wasn't entirely sure what those were in their entirity, and offered him a couple of angles to diagnose X himself.
God forbid, maybe even test it yourself so that you understand more thoroughly. (And yes I did read your comment in this thread about not being at a computer with a WE.)
I think this is where you would, in my situation, use the opportunity to point out how this contradicts itself.
Instead, I'd rather a moment to elaborate on my exact circumstances, and my opinion on this in general...
I can't test this when I'm not at home, you yourself said why, and when I am at home, I have a wife and kid that I'd rather spend time on. I actually have tested issues for people multiple times though. Hell, I'm even helping out a few people with their maps on a running basis. I just don't have time to test every single little issue that's posted on the forum for people, nor do I want to, when A) There's people that already know these answers likely to bump in later, and B) Because I'd rather have them test it themselves. I have no desire to know every little nook and cranny of this horribly outdated and relatively irrelevant software, it's just a hobby of mine. I'd rather dedicate my time to solving issues that nobody else has bothered helping people to solve, or people have attempted to solve themselves without success. When I responded to this thread, it had only been up for a few hours or so. I knew full well that there'd be people coming in and explaining X to him, I wasn't too concerned about that, I just wanted to point him in the direction of Y in the meantime, so he could start getting to work on a solution, instead of wasting time and frustration on X. That was the essence of my post: Y. It's also what OP chose to take from the post. Yet, you came in and focused on X. To a certain extent, it's great that you did. My guess was wrong, it needed to be corrected, and you, with the extension of DSG, knew all the right details to X. What wasn't constructive, was you lambasting me for failing to provide something that I very clearly didn't aim to provide in the first place. Hell, I even dumbed down my explanation of it, just to make it perfectly clear, that I wasn't attempting to make any statement on the matter. It seems like that just triggered you even harder though, so the joke's on me I guess.
That's all I want from you. I'm just annoyed with the way you respond like you are contributing something but are in fact just parroting text you neither understand nor are sure of like it's the gospel. That you admit when you don't know something is commendable and I appreciate that, but please follow through and actually learn.
Let me cut out a part of this quote for you:
parroting text you neither understand nor are sure of like it's the gospel. That you admit when you don't know something is commendable
Now, the first half says: "You say this like it's objective truth" (like it's the gospel)
And then in the very next sentence you say: "You admit not knowing it"
I think this sort of summarizes my viewpoint on this whole debacle. You wanna accuse me of doing something that I didn't do. I never claimed to know X, let alone like "it's the gospel!", in fact, I quite clearly stated the opposite, which is what you admit in the second part.
I'm not really trying to "get the best of you" here, I just wanna point out how you escalate the situation with your hyperbolic expressions and needlessly hostile attitude.
I am fully open to the idea that there's things I could improve about how I help people on this forum, and especially from people like you and DSG, who have a lot of experience in that area. That's awesome, I love to learn, and I love self-improvement. I take a lot of the things you write into consideration, and I will be phrasing my future posts with more careful wording in mind, to avoid inadverdently spread misinformation. I was under the impression that I had attempted doing just that, but if I had done that properly, I guess we wouldn't be having this conversation right now.
That's my take-away from this. What's yours?
Also, I just wanna adress the rest of this part real quick:
That's all I want from you. I'm just annoyed with the way you respond like you are contributing something but are in fact just parroting text you neither understand nor are sure of like it's the gospel. That you admit when you don't know something is commendable and I appreciate that, but please follow through and actually learn.
I wanna make it perfectly clear that I am not in any way motivated by attention or seeking unwarranted acknowledgement. I just like helping people. I don't come into threads parroting stuff I don't understand. I came in saying what it was I didn't understand, offered a possible explanation, a way to test if said explanation was somewhere in the right direction or totally off, a way to test a separate possible issue, and a solution to the problem itself, which I'd argue is the most substantial thing that I did in fact contribute, namely, Y.
Sure, I didn't contribute X, but we've been over that. Saying that Y is useless without X is wrong. It's better to have both, but they aren't mutually inclusive.
As for following through and learning. Well... I did! If you scroll back up you'll find several examples of that. Including this response.
I'd love it if you could take something away from this as well. Have a look at DSG's responses. I think they set a great example for something I'd wish that you'd reflect on a bit yourself.
In any case, if you wanna talk this out, further, how about we continue on direct messages instead? I'd rather not have this flare up again, and like I've said, I am totally open to input on how I conduct myself around this forum, since it's clearly seen as problematic. I harbor no disrespect or ill feelings towards you, I would just love if we could sort this out in a way that we're both comfortable with.