
-----------------------------------
MOUSECORD
Thu Jun 10, 2004 3:56 pm

help with whatdotcolour
-----------------------------------
Alright i know there are tutorials on this and yes i know bla bla bla but i can't understand it and i need some help i'm making it so when i click it makes a expanding procedure oval then goes back in... (missile command) and i need it so when the missile hits it... it destroys u know i dunno hwot o apply this... whatdotcolour to it... neone help please !!!  :roll:  :shock:  :x

-----------------------------------
aside
Thu Jun 10, 2004 4:01 pm


-----------------------------------
whatdotcolour if a funtion that will return a value of the colour somehwere on the screen. the coordinates you put in has to be less than maxx and maxy. 
ex:

var col, mx, my, mb:int
loop
mousewhere (mx, my, mb)
locate (1, 1)
put whatdotcolour (mx, my)
end loop


this will return the colour where the mouse is

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 4:48 pm

hhh
-----------------------------------
is there a way to make it like ... lets say... 

If thisline goes over this color then
         score:=score+100
end if 

i kno that makes nos esnes and its in like english not programming but do u see where i'm coming from....

-----------------------------------
aside
Thu Jun 10, 2004 5:27 pm


-----------------------------------
you need a value to draw the line in the first place right? suppose the coordinates is (x2, y2) use:

if whatdotcolour (x2, y2)= (the colour you want as an integer) then
score+=100
end if

check it after each time you change the value of x2, y2

-----------------------------------
aside
Thu Jun 10, 2004 5:36 pm


-----------------------------------
also, if you pm dodge_tomahawk, he would love to tell you everything about whatdotcolour and every other thing that you don't need to know.

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:02 pm


-----------------------------------
I want to make it so when i click a oval expands then implodes... back to 0 in a procedure... got ne ideas... without using a loop...

-----------------------------------
aside
Thu Jun 10, 2004 6:05 pm


-----------------------------------
you can use a for loop, and use the variable (usu. i) to determine the radii of the oval

-----------------------------------
Kamikagushi
Thu Jun 10, 2004 6:07 pm


-----------------------------------
~or as what mr mackenzie taught to use a boolean function~

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:08 pm

damn
-----------------------------------
this would be easier if i wasn't sucha noob eh... *over head*

-----------------------------------
aside
Thu Jun 10, 2004 6:09 pm


-----------------------------------
so.... what are you trying to do again?

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:13 pm


-----------------------------------
this is what i have... 

 procedure mouse

   var mousex, mousey, button : int

    mousewhere (mousex, mousey, button)
    if button = 1 then
    
    
        drawoval (mousex, mousey, 25, 25, 13)
        
        
    end if
end mouse


loop
cls
mouse
delay(25)
View.Update
end loop


see how when you click it kinda just... draws a circle... well i want it go start from where u click and expand to 25... then implode back to 0... u see??? but i need it to not be in a loop because it will get trapped in it... i need it in a procedure or something you know... i have a loop at the end of my game... and i guess i could make some in a procedure then put rest in that loop... i don't know do you get what i'm saying??

-----------------------------------
aside
Thu Jun 10, 2004 6:19 pm


-----------------------------------
so.... ? i'm not sure about no looping part, that's not my strong point.


   var mousex, mousey, button : int 

loop 

    mousewhere (mousex, mousey, button) 
    if button = 1 then 
    for i:1..25
            drawoval (mousex, mousey, i, i, 13) 
            View.Update 
            delay (10)
            cls
    end for
    for decreasing i:25..1
    
        drawoval (mousex, mousey, i, i, 13) 
       View.Update 

        delay (10)
        cls
    end for
        
    end if 

end loop 


-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:19 pm


-----------------------------------
acually nvm i think i got it dude... lol nice i made it go up but now i gotta make it go back down see look



 procedure mouse

   var mousex, mousey, button : int
    mousewhere (mousex, mousey, button)
    if button = 1 then
    
    for rad: 1..25
    cls
        drawoval (mousex, mousey, rad, rad, 13)
    delay(25)    
    end for    
        
    end if
end mouse


loop
cls
mouse
delay(25)
View.Update
end loop



ne ideas....

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:21 pm


-----------------------------------
nvm i got it LOL!!! OMFG I"M GOD YO :)

-----------------------------------
SuperGenius
Thu Jun 10, 2004 6:22 pm


-----------------------------------
aside has got it, you need a decreasing for loop after the first for loop.

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:24 pm


-----------------------------------
ahh fawk now when i put it in "for" is like a loop so when i click it freezes everything else... how do i make it not do that AHHHHHHH i had it all working u know u click it expands then implodes but the for loop is like .... it gets stuck in it until its done how can i make everything else keep going at same time??

-----------------------------------
MOUSECORD
Thu Jun 10, 2004 6:43 pm


-----------------------------------
see

 procedure mouse

   var mousex, mousey, button : int
    mousewhere (mousex, mousey, button)
    if button = 1 then
    
    for rad: 1..25
    cls
        drawoval (mousex, mousey, rad, rad, 66)
    delay(25)    
    end for    
    
    
    for decreasing rad: 25..1
    cls  
            drawoval (mousex, mousey, rad, rad, 66)
    delay(25) 
    end for
    end if
end mouse


loop
cls
mouse
delay(25)
View.Update
end loop

if i put something else in the loop say one of my misiles for the game (missile command) the missile lags until the mouse procedure is finished.... is there any way to get around this and still have the same Mouse Procedure affect ... i really need this anyone knows??

-----------------------------------
aside
Thu Jun 10, 2004 8:56 pm


-----------------------------------
is there a limit of boolets you can shoot? if so, then it would be easier to do.

-----------------------------------
aside
Fri Jun 11, 2004 12:00 pm


-----------------------------------
if you are sick and tired of this, you can just use fork. it's not recommended, but if you are just lazy, go ahead.
