Jump to content

Counting monsters around you


Mellowz
 Share

Recommended Posts

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 by Kyler Carlson
Link to comment
Share on other sites

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

Holly 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 :)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...