Mellowz Posted September 21, 2006 Share Posted September 21, 2006 How can I detect monsters in a certain area? How can I script it so it detects a monster (in a certain radius around the character)? Thanks, Mellowz Link to comment Share on other sites More sharing options...
CoderDunn Posted September 21, 2006 Share Posted September 21, 2006 Look at PixelSearch(). You will need to find a unique color for every monster. Hallman Link to comment Share on other sites More sharing options...
Kyler Carlson Posted September 21, 2006 Share Posted September 21, 2006 (edited) Look at PixelSearch(). You will need to find a unique color for every monster. Hallman not really... i think this would work but you would have to make sure that there is only one pixel on the monster that is a certain color... i suppose you could add some proximity stuff to this and i might do that a little later but untill then, this is working for me in paint... to count dots... Func pixelcount($x1,$y1,$x2,$y2,$color) $count = 0 $stop = 0 $x3 = $x1 $y3 = $y2 Do $start = PixelSearch($x1,$y1,$x2,$y2,$color) If IsArray($start) Then $x1 = $start[0] $y1 = $start[1] $y1 = $start[1] + 1 $count = $count + 1 $stop = 0 EndIf If Not IsArray($start) Then $x1 = $x3 $y1 = $y1 + 1 $y2 = $y3 $stop = $stop + 1 EndIf Until $stop = 5 MsgBox(0,"",$count & " final") EndFunc to use it, you would do pixelcount((left),(top),(right),(bottom),"(color)") but without the extra ()'s edit: this isn't working with pixels on the exact same line horizontally... yet Edited September 21, 2006 by Kyler Carlson Link to comment Share on other sites More sharing options...
Uten Posted September 21, 2006 Share Posted September 21, 2006 How can I detect monsters in a certain area? How can I script it so it detects a monster (in a certain radius around the character)?Thanks,MellowzHolly crap I'm so glad I'm back at the point house at the moment and not in the woods. How long do you think these monsters will be around Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
CoePSX Posted September 21, 2006 Share Posted September 21, 2006 What are you guys talking about? If you want to detect monsters you need to get a mosnter detector. Have you ever watched GhostBusters? Oh, and if you can't find one, try looking under the bed or inside the closet, that always works [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now