Ok, since the new gunner system prototype will require a good way to detect movement as accurately as possible, I cooked up this little unit movement detector prototype for the job. I also tacked on a little unit train sample, to make it interesting. The 'tick' sounds indicate when the triggers detect movement, by the way.
Though it requires a bit of locations, it works pretty well since it can detect movements almost to the pixel. I've also thought of using unit grids and location centering, but both of those have precision and other flaws, and wouldn't work for exact purposes.
If anyone's interested in such a thing, here it is:
EDIT- Found a small error. Fixed.
i can totaly understand what that text says
QUOTE(sunslap @ Aug 29 2006, 06:31 PM)
i can totaly understand what that text says
[right][snapback]553237[/snapback][/right]
right click, save target as, find folder, add .scx to the end of the name
So yeah, nothing special. Just thought I'd share that method. I'll refine it a bit for the actual gunner system prototype, though.
jsut curious, how does that have to do with a gunner system?
also, i haven't really examined your map yet, but is it possible to make the formation tighter? so that the units are slightly overlapping?
Yes it is. I could make them tight as a pixel practically if I wanted. I just spaced them out to demo the train effect.
See my other concept thread's latest post for the new prototype outline, and how movement detecting factors in.
I like it, and after reviewing triggers, I realize its something a lot like a system I had planned for an entirely different purpose. I think I see how this could help in a couple areas.
well i was playing the map and i tried to bug it up and i found out that it doesnt always detect when u move, like when i move 1 pixel to some direction it would move and nothing happens then to another and it worked. so just saying
Hmm. Well then, I guess a new prototype is in order.
I think I found a vastly simpler way to do it just now, actually. Can't believe I didn't think of it sooner. Especially since I've already done it before in another form.
Sometimes it would detect false movement and I would hear random clicks every once in a while but gj.
That's not a trigger bug. That's actually a SC bug with playing certain wavs. Happened in Rush too.
That bug is due to the high quality sound, doesn't do that to any quality lower than 22.050 I think.
What does this have to do with the new gunner system?
Well it's for detecting swarms from multiple players. You know for instance that if a player is moving, they can't be the one firing. Casting and attacking requires being still, after all.
Very nice idea there mate... I could have sworn that wasn't true though... Maybe my memory is just faulty, and seeing that I don't have a copy of SC at the moment, I'm bump out of luck to test it...
Still, an extremly intriguing concept if it can be made to work well.
QUOTE(SuperToast @ Aug 30 2006, 11:45 PM)
An extremly intriguing concept if it can be made to work well.
[right][snapback]553827[/snapback][/right]
...but extremely irritating if it doesn't.
I looked at the triggers, and one thing I can't figure out is what's with the 'center location labelled 'whatever' on independent command center owned by player 1 at anywhere. (why independent command center?)
Because it's a unit that can't possibly exist in the map (unless specifically preplaced). Whenever a location is centered on a unit that doesn't exist in the other location, it just defaults to centering it to the middle of the other location.
just learned something, thank you
and i like the idea for detecting who shot the swarm i hope it works out
QUOTE(Tuxedo Templar @ Aug 30 2006, 07:29 PM)
Well it's for detecting swarms from multiple players. You know for instance that if a player is moving, they can't be the one firing. Casting and attacking requires being still, after all.
[right][snapback]553801[/snapback][/right]
A number of glitches can come here.
1 possible glitch being if player 2 is swarming player 1 is attacking, they are both standing still. The swarm will be detected for p1?
another glitch could be if you had p1 and p2 swarming it would still come out as p1 over p2?
If its 3 players it could be something like
P1 Attacking, P2 Moving, P3 swarming.
If what you say is true p1 is staying still because its attacking, p2 is moving so it can't be him / her and p3 is staying still because he or she is swarming. Once again its still p1 who gets the swarm?
Here,
this describes the method I'm using to prevent swarm mixups. It's basically an intuitive turn-based method.
That looks like a good idea for the anti-swarm mixup. I sort of have a question though. I was experimenting with center view and your tick idea. Since you say you detect every pixel movement (or approximately every one), could you create a better centerview method so that it centers every pixel pretty much? I added a center view to every location that was smaller than a normal grid size and it seemed to work. Or is it a part of starcraft where you can only center view every grid square?
I had always believed that sc can only center view grid squares, and that they just made the screen scroll fast enough that you never notice
. Don't quote me on that, though.
Center view? You mean center location?
Locations move by starcraft's grid, which is not by the exact pixel unforunately. However I believe locations themselves can be sized by the pixel, so you can work with that fact.
I'm talking about center view. In most movie maps when the screen scrolls it goes 1 grid square at a time. If you centered a location on a moving observer and used this method, would it be possible to fix that 1 by 1 movement or does Starcraft center by grid squares?
It's not by grid squares. That is, not the full 32 pixel range. It's more like 8 or so pixels... I can't remember exactly. There seems to be a kind of subgrid thing going on, which I believe is also what the tileset tiles use for pieces of each tile (tile data is actually stored in smaller pieces from what I recall, oddly enough).
Someone knows how this crap works exactly and can explain it better I'm sure. I only know what I need to know to use it for making maps.