
-----------------------------------
Kaptesh
Wed Jan 19, 2005 8:31 pm

PLEASE HELP FAASSSTT&gt;&gt;Project Due Tomorrow!!!
-----------------------------------
Hey guys please help me...I'm a TOTAL newbie..
var chars : array char of boolean
var x, y, c : int
x := 4
y := 4
c := Rand.Int (0, maxcolor)



loop


    Input.KeyDown (chars)

    if chars (KEY_UP_ARROW) then
        y := y + 5
        delay (5)

    elsif chars (KEY_RIGHT_ARROW) then
        x := x + 5
        delay (5)

    elsif chars (KEY_LEFT_ARROW) then
        x := x - 5
        delay (5)

    elsif chars (KEY_DOWN_ARROW) then
        y := y - 5
        delay (5)

    elsif chars (KEY_ALT) then
        if y>0 then drawfilloval (x, y, 10, 10, Rand.Int (0, maxcolor))
        end if
delay (500)
    end if

    drawfilloval (x, y, 4, 4, c)
    delay (5)

end loop
 
Everything works..but when I press ALT I want the ball to change colour and draw with that new colour..Please someone help!!!  :(  :(

-----------------------------------
Martin
Wed Jan 19, 2005 8:34 pm


-----------------------------------
elsif chars (KEY_ALT) then
    c := Rand.Int(0,maxcolor)
else ...

That's all you need.

Also, you should make them seperate if statements (ie. if keys(KEY_UP_ARROW) then ... end if if keys (KEY_LEFT_ARROW) then .. end if)

That way, if users press up and left, it moves the ball up and left.

-----------------------------------
Kaptesh
Wed Jan 19, 2005 9:03 pm


-----------------------------------
Wow...that was fast..thankks man it works...  :D

-----------------------------------
Tony
Thu Jan 20, 2005 9:30 am


-----------------------------------
that's his project?
 :shock: 
just imagine that kind of an awesome colour changing program this kid would be able to make once he graduates from that school :lol:

-----------------------------------
Neo
Thu Jan 20, 2005 10:28 am


-----------------------------------
that's his project?
 :shock: 
just imagine that kind of an awesome colour changing program this kid would be able to make once he graduates from that school :lol:

It probably is just a small protion of his final project, the larger part is a 3D FPS with dynamic lighting and the like.  :lol:

-----------------------------------
Pip_Jr
Thu Jan 20, 2005 10:09 pm


-----------------------------------
Dude... My project is harder then that... adn i'm in grade 9 and i'm geting pissed off! couse my teacher is being an ass  :twisted: 

I need to make hang man with arrays and proccedures, and i lost my notes =S

-----------------------------------
eNc
Fri Jan 21, 2005 9:49 am


-----------------------------------
Dude... My project is harder then that... adn i'm in grade 9 and i'm geting pissed off! couse my teacher is being an ass  :twisted: 

I need to make hang man with arrays and proccedures, and i lost my notes =S

Lost or didn't take ? I kno im compsci I never take notes lol.

-----------------------------------
Tony
Fri Jan 21, 2005 12:38 pm


-----------------------------------
the only notes there are to take is proper syntax reference..

and I just print out the documentation that comes with whatever library I'm using :wink:

-----------------------------------
MysticVegeta
Sat Jan 22, 2005 11:15 am


-----------------------------------
Dude... My project is harder then that... adn i'm in grade 9 and i'm geting pissed off! couse my teacher is being an ass  :twisted: 

I need to make hang man with arrays and proccedures, and i lost my notes =S

Wow i got hangman for isp too and i handed it in. Its not that hard!!! :D
