I think this will be a cool one for people of all ranges: I figured out a way to detect mouse movement to give a diablo style mouse system... as well as the camera of course. I also show a simple attack system. Anyway, at the end I show how my system really works and how hilarious it is, but nonetheless works pretty flawlessly.
Mostly a description-type tutorial FYI, explaining how I did it...
Y, problem with that is that its circle detection. Not square detection. So there will always be blanked areas... You can cover 100% f the terrain. Tho its accurate enough, but not best for some systems...
ive been trying this, but with a larger map it seems like starcraft doesnt want to filla 256x256 area with buildings or units... any ideas? itll only fill like the first 10 columns...
Why not have it set up to only create the invisible units in an area around the hero that the camera can see, and destroy any others? This would drastically cut the number of spawned units down.
Something like a periodic effect that would check a 10x10-ish grid around the position of the hero unit, if a probe is there, do nothing. if not, create one. use a behavior to do a periodic enumerate area search to check for if a hero is within a 10 range, if not have the probe die.
I see a few problems arising if you have doodads/units of your own that may be covering the invisible mouse over testers. Alternatively, if you set your testers to a high enough level as to not be occluded, you would be unable to test the mouseover for units below? However, an interesting and innovative proof of concept none the less.
I actually have that idea before, wondering does unit highlight event actually work, and how much hidden unit can be until it does not work
Not going through the video but I can make a trigger library that create these unit by grid, location taken from map bounds, modify unit model, turn some of their flag off and turn the trigger for detection on. Finally return 2 variable for x and y
Edit: a library is in the work. Using all technique possible to improve precision and reduce lag
@Kalekin: Yeah but you can select units behind doodads right? And you could modify this to still keep you moving even if you mouse over other units (if your mouse is already down).
@Zanam: By all means go ahead and do this more dynamic system... I took a simpler route, but for big maps you might have to do that around each player.
Last note: This probably lags less than WASD, because were using the event "A unit is highlighted" for the most part... but there is some mouse detection triggers. I found very little gfx lag (or none at all) having 100 drones on my screen with 0 opacity.
Its actually doing good. I have a model other than invisible unit that actually allow highlight (use invisible model and it wont) So unit wont even need to be 0 opacity. Also alot of stuff u manually do in data can be done by the library. So its actually gonna be a 3 step noobs library
I wonder if you could reduce the # of probes by attaching them somehow to the zealot, or by teleporting them very quickly with specific offsets to the zealot. This way you'd only need enough probes to fill one screen, could increase their base scale to optimize it on the outside of the screen. Anyway, very cool workaround and very creative!
onetwo, i made a few modifications to your method, i basically have a block of units following my guy. The only problem, is that if i click my mouse and hold it in one spot, it never leaves a single drone, causing it to stop running because the target never changes. (cursor follows the drone due to the camera moving with the drones at the same speed basically. Have any ideas for me?
I checked your youtube site and was like "aww no diablo tutorial.. oh well I will just have to do it myself..". I make it. THEN you make the tutorial >.< But my version is a bit different cuz I dont have the "hold mouse = keep moving" thing. It makes you be more involved I think. But nice tutorial anyways.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
I think this will be a cool one for people of all ranges: I figured out a way to detect mouse movement to give a diablo style mouse system... as well as the camera of course. I also show a simple attack system. Anyway, at the end I show how my system really works and how hilarious it is, but nonetheless works pretty flawlessly.
Mostly a description-type tutorial FYI, explaining how I did it...
Map DL link: Link Removed: http://www.mediafire.com/?oqu2b9y0y1obple
@OneTwoSC: Go
Lol I PM you on YouTube asking if this is possible and within a day you manage it. Nice work :P
Have you tried this on bnet at all?
@MillsySC: Go
Haha... Bnet performance untested :D
We were discussing that using a cube or plane model might be ideal instead of a drone if you really want to do it...
Y, problem with that is that its circle detection. Not square detection. So there will always be blanked areas... You can cover 100% f the terrain. Tho its accurate enough, but not best for some systems...
@tigerija: Go
Yeah, fair enough... hope we get mouse detection some day haha.
@OneTwoSC: Go
ive been trying this, but with a larger map it seems like starcraft doesnt want to filla 256x256 area with buildings or units... any ideas? itll only fill like the first 10 columns...
@OneTwoSC: Go
You rock dude. Might have to replace my wasd with this. Do you think it would lag twice as badly tho?
Why not have it set up to only create the invisible units in an area around the hero that the camera can see, and destroy any others? This would drastically cut the number of spawned units down.
Something like a periodic effect that would check a 10x10-ish grid around the position of the hero unit, if a probe is there, do nothing. if not, create one. use a behavior to do a periodic enumerate area search to check for if a hero is within a 10 range, if not have the probe die.
TOTALLY SICK
Sounds like a really annoying work-around to create, but the effect is neat.
I see a few problems arising if you have doodads/units of your own that may be covering the invisible mouse over testers. Alternatively, if you set your testers to a high enough level as to not be occluded, you would be unable to test the mouseover for units below? However, an interesting and innovative proof of concept none the less.
I actually have that idea before, wondering does unit highlight event actually work, and how much hidden unit can be until it does not work
Not going through the video but I can make a trigger library that create these unit by grid, location taken from map bounds, modify unit model, turn some of their flag off and turn the trigger for detection on. Finally return 2 variable for x and y
Edit: a library is in the work. Using all technique possible to improve precision and reduce lag
There already is well was made, but I think it wont be finished. I previewed it long time before with my custom model with torso rotation.
Well, that with height can be tested probbly. It might work.
@tigerija: Go
Your grammar stumped me for a bit haha.
@progammer: let me know how this goes!
@Kalekin: Yeah but you can select units behind doodads right? And you could modify this to still keep you moving even if you mouse over other units (if your mouse is already down).
@Zanam: By all means go ahead and do this more dynamic system... I took a simpler route, but for big maps you might have to do that around each player.
Last note: This probably lags less than WASD, because were using the event "A unit is highlighted" for the most part... but there is some mouse detection triggers. I found very little gfx lag (or none at all) having 100 drones on my screen with 0 opacity.
Its actually doing good. I have a model other than invisible unit that actually allow highlight (use invisible model and it wont) So unit wont even need to be 0 opacity. Also alot of stuff u manually do in data can be done by the library. So its actually gonna be a 3 step noobs library
ha, very interesting.
I wonder if you could reduce the # of probes by attaching them somehow to the zealot, or by teleporting them very quickly with specific offsets to the zealot. This way you'd only need enough probes to fill one screen, could increase their base scale to optimize it on the outside of the screen. Anyway, very cool workaround and very creative!
I was in a hurry :D . Now I see that I thrown few un-logical words in there xD.
">There already is well was made, but I think it wont be finished." hahahaahahhaha
That line is awesome.
onetwo, i made a few modifications to your method, i basically have a block of units following my guy. The only problem, is that if i click my mouse and hold it in one spot, it never leaves a single drone, causing it to stop running because the target never changes. (cursor follows the drone due to the camera moving with the drones at the same speed basically. Have any ideas for me?
I checked your youtube site and was like "aww no diablo tutorial.. oh well I will just have to do it myself..". I make it. THEN you make the tutorial >.< But my version is a bit different cuz I dont have the "hold mouse = keep moving" thing. It makes you be more involved I think. But nice tutorial anyways.