Bixby Sayz Posted December 29, 2011 Share Posted December 29, 2011 (edited) Wrote this for my own use/sanity. Thought I would share. Allows you to visually select color/radius/angle for RadarRoadWalk. Hope it helps someone. Any feedback would be greatly appreciated. EDIT: DISCLAIMER This needs rework. It is laggy as hell and is not entirely accurate with how the offsets work. It's still decent for seeing what all those numbers mean. The standard disclaimer applies: Use at your own risk. If it drinks all your beer and kicks your dog you were warned. RadarRoadWalkAid_v1.00.scar Edited February 21, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
rsutton Posted December 29, 2011 Share Posted December 29, 2011 Very nice work, I perfer the original method though Quote Link to comment Share on other sites More sharing options...
Wanted Posted December 29, 2011 Share Posted December 29, 2011 This is really impressive, I really like the GUI. There's a few inconsistencies with the actual functionality between the way your aid works and the actual functionality of RadarRoadWalk and a few hiccups. I didn't have any troubles with the copy button pushing the window back and having to do alt-tab or whatever ( I don't think? ) but it's probably a good idea to make an edit box or something with editable text to output the code into so it can actually be highlighted and copied etc. The minimap canvas grabbing is neat but SMART has to be enabled for it to work, (automatic refresh (like 100ms) option may be something to consider) The offsets don't work by adjusting the center of the circle, all they do is shift the final point that is the center of the matched TPA that is within the defined pie slice. This may be a greater challenge in creating a walking aid of this kind is finding a way to input the values used to generate the TPA and where the actual point is shown within the given slice of it (then with offsets) maybe even inputting options for splitting and arranged the TPA used. Well you don't have to go that far, although it would be a quite a feat pulling it off. The important thing is that you remove/fix the offsets. Quote Link to comment Share on other sites More sharing options...
mormonman Posted December 29, 2011 Share Posted December 29, 2011 I find it really weird that we worked on the same sort of thing. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted December 29, 2011 Author Share Posted December 29, 2011 The offsets don't work by adjusting the center of the circle, all they do is shift the final point that is the center of the matched TPA that is within the defined pie slice.Not sure I understand this statement. My understanding was: RRW will find a point somewhere in that pie shaped area, then offset that point. Which would mean the possible final location is that pie shape, only translocated? Quote Link to comment Share on other sites More sharing options...
Wanted Posted December 29, 2011 Share Posted December 29, 2011 (edited) I find it really weird that we worked on the same sort of thing. I noticed that too. Not sure I understand this statement. My understanding was: RRW will find a point somewhere in that pie shaped area, then offset that point. Which would mean the possible final location is that pie shape, only translocated? No because if you moved the area that would possibly drastically change your result as the input TPA only fills a segment of the defined area. I also generally use a lot more than +10 -10 degrees like 25 to 45 and generally only use +-5 radius. You may want to decrease the canvas refresh interval for the mouse hover over as it tends to lag. Edited December 29, 2011 by Wanted Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted December 29, 2011 Author Share Posted December 29, 2011 Cool. I'll have to revisit this. I'd like to have it show exactly what is/will happen. But later. In a "I don't feel like scripting for a while" kinda mood lately. Quote Link to comment Share on other sites More sharing options...
Naum Posted February 14, 2012 Share Posted February 14, 2012 This is very good! Nice work!!! Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 15, 2012 Author Share Posted February 15, 2012 Glad someone enjoyed it. The collective response has been "meh". Suits my needs, although Wanted's suggestions would make it a lot better. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 20, 2012 Share Posted February 20, 2012 Holy shit.. excuse my lang. but i just downloaded and opened up thinking you know maybe 400 lines and was surprised you put some time into this! Im going to give it some test and see what its all about =) And post more appropriate feedback =p ---------- Post added at 11:16 PM ---------- Previous post was at 11:09 PM ---------- After some toying around with this i could see great potential in this, Man i love what you have done this will help me greatly as when i road walk i like to offset from things that are far off if left field so i know nothing can interfere and this seems to be a more precise way to offset and not have to just do trial and error! ---------- Post added at 11:22 PM ---------- Previous post was at 11:16 PM ---------- one thing is see that needs to be correct is: CopyMinimap ->> Needs to free BMP. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 20, 2012 Author Share Posted February 20, 2012 This could be waaaay better. Originally I intended to do it entirely on the smart debug canvas, but at the time couldn't get it to work. And it is not entirely accurate as to how radarroadwalk works internally. One of those "to dos" I never got back to. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 21, 2012 Share Posted February 21, 2012 Another issue im running into is i am offsetting about 110 cord sometimes because im using tree trunks way off in the distance to walk on the road, and the max you allow to off set is 50, plus you move the whole bmp why not jsut move a cross hairs with the center location of the main bmp? ---------- Post added at 12:17 AM ---------- Previous post was at 12:16 AM ---------- its a really good idea, and im loving it, been messing with it for the past hour. =) Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 21, 2012 Share Posted February 21, 2012 Another issue im running into is i am offsetting about 110 cord sometimes because im using tree trunks way off in the distance to walk on the road, and the max you allow to off set is 50, plus you move the whole bmp why not jsut move a cross hairs with the center location of the main bmp? ---------- Post added at 12:17 AM ---------- Previous post was at 12:16 AM ---------- its a really good idea, and im loving it, been messing with it for the past hour. =) Just read the whole thread so you don't end up using RadarWalk incorrectly (the offsets do not work as shown in the aid yet) Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 21, 2012 Author Share Posted February 21, 2012 Hmm, wonder if it would be better to remove script until get a chance to update. Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 21, 2012 Share Posted February 21, 2012 Hmm, wonder if it would be better to remove script until get a chance to update. Nah I would just put up a disclaimer or something or do like EditBoxWhateverOffsetsAre.Disabled and reupload it. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 21, 2012 Share Posted February 21, 2012 (edited) Just read the whole thread so you don't end up using RadarWalk incorrectly (the offsets do not work as shown in the aid yet) Are they originally meant to offset the center point? Because ive been using them as he has it set up here and ofseting where the color is found. Ive been using it like that before i ever stumbled upon this. Before tho i was just guessing where the script gave me a visual of where i would end up and its worked so far. ---------- Post added at 04:47 AM ---------- Previous post was at 04:46 AM ---------- Hmm, wonder if it would be better to remove script until get a chance to update. nah i wouldnt remove most people will simply use the regular walking and not offset anyways. Edited February 21, 2012 by shadowrecon Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 21, 2012 Share Posted February 21, 2012 EditOffsetBox.Enabled := False; Are they originally meant to offset the center point? Because ive been using them as he has it set up here and ofseting where the color is found. Ive been using it like that before i ever stumbled upon this. Before tho i was just guessing where the script gave me a visual of where i would end up and its worked so far. ---------- Post added at 04:47 AM ---------- Previous post was at 04:46 AM ---------- nah i would removed most people will simply use the regular walking and not offset anyways. No the offsets do not work this way at all. All they do is change the final point by adding (or subtracting) from it. The final point being the center of the found TPA. Entirely different than moving the relative origin used to generated the circle pie based search area. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 21, 2012 Share Posted February 21, 2012 (edited) yeah thats how im using it, and thats how his offset works except it moves the whole search sear and you have to guess about where the center is you selected. but using his offset its worked for me as long as i keep an eye on where the original point was on the red search area. [scar] function RoadWalk(RoadColor, RoadTol: integer; RoadHue, RoadSat,SRad, ERad, SAng, EAng, FlagD: Extended; XOffset, YOffset: Integer): Boolean; var TPA: TPointArray; RX, RY: Integer; begin Wait(250); RY := 0; RX := 0; ColorToleranceSpeed(2); SetColorSpeed2Modifiers(RoadHue, RoadSat); FindMMColorsTolerance(TPA, RoadColor, RoadTol); SetColorSpeed2Modifiers(0.02, 0.02); ColorToleranceSpeed(1); Result := RadarRoadWalk(TPA, SRad, ERad, SAng, EAng, FlagD, XOffset, YOffset, RX, RY); end; RoadWalk(LC,LT,LH,LS,-4.810, 47.190, -19.290, 160.710,2,41, -25) // 41 and -25 are the offsets from the script 41 right 25 up from center of red search area [/scar] if he simply made the blue bitmap a cross where the red bitmap selected center originates then it would be perfect. Edited February 21, 2012 by shadowrecon Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 21, 2012 Author Share Posted February 21, 2012 if he simply made the blue bitmap a cross where the red bitmap selected center originates then it would be perfect.Ironically that's how it was in the beginning, and it did not generate the search area until you clicked on the map. For some reason decided to change it. Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 22, 2012 Share Posted February 22, 2012 I contemplated making this before but didn't think of how to actually incorporate a system in which it would actually show you the road TPA found and the center of it. Guess you could switch the client search target to the bitmap and use typical FindColorsTolerance Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 22, 2012 Author Share Posted February 22, 2012 I contemplated making this before but didn't think of how to actually incorporate a system in which it would actually show you the road TPA found and the center of it. Guess you could switch the client search target to the bitmap and use typical FindColorsToleranceI was thinking along the same lines. But did not want to get back into this particular project for a few weeks yet. Why oh why did I post this? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 22, 2012 Share Posted February 22, 2012 I was thinking along the same lines. But did not want to get back into this particular project for a few weeks yet. Why oh why did I post this? Lol, no rush, it works just fine for me i would like to know if there would be away for me to change the maximum offset from 50 to higher? I was simply trying to give you feedback on something it looks like you put alot of time into. Other than that im pretty happy with it. Instead of Making it find the TPA just leave that to user. all i do is open ACA at the same time mark colors and set my center point where i know its going to find the TPA Center and work from that. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 22, 2012 Author Share Posted February 22, 2012 You need to change these lines in the forms definition (search for them): [sCAR]XOffsetSpinEdit.Max := 50; YOffsetSpinEdit.Max := 50;[/sCAR] Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 23, 2012 Share Posted February 23, 2012 You need to change these lines in the forms definition (search for them):[sCAR]XOffsetSpinEdit.Max := 50; YOffsetSpinEdit.Max := 50;[/sCAR] Thanks that fixed my issue! =) Quote Link to comment Share on other sites More sharing options...