
-----------------------------------

Wed May 10, 2006 10:09 pm

Help on Helicopter game
-----------------------------------
Hey I'm new to these forums. I'm in a Grade 11 Programming Course and we're learning Turing. I seem to have a problem with my Helicopter game I'm working on, when I hold down the mouse and touch the green, the helicopter goes through it. 

Im guessing it's a logical bug I cant seem to find, because I reversed and made helicopter go down when I held the mouse and he crashed.

-----------------------------------
Darkmantis
Thu May 11, 2006 8:53 am


-----------------------------------
I think you should try placing your whatdotcolor code inside the buttonpress code so that it detects while your pressing down the mouse button.

-----------------------------------

Thu May 11, 2006 9:03 am

=)
-----------------------------------
Thanks =D

-----------------------------------
Darkmantis
Thu May 11, 2006 10:38 am


-----------------------------------
no problem, this was my first time acually helping someone :)

-----------------------------------
monkeynamedsteve
Thu May 11, 2006 1:55 pm


-----------------------------------
Just a tip, when you use the whatdotcolour code, make sure to make the pixels it locates the corners of the helicopter picture. If you make it the middle of the picture, it won't be as effecient. I learned this trying to work on my Pacman program.

-----------------------------------
Darkmantis
Thu May 11, 2006 5:20 pm


-----------------------------------
ya for my pac man game I had to use 4 points too, but my pac-man still managed to eat the wall.. :( but I only had like 2 days to work on it anyway.

-----------------------------------
MysticVegeta
Thu May 11, 2006 5:53 pm


-----------------------------------
you could also use random green boxes making a level with patterns but thats upto you.
Also, 1 more alternative to the whatdotcolor is the Math.Distance formula, if you plan to make the green boxes on turing rather than images, then Math.Distance would be a better approach, its basically a simple distance function in a Cartesian plane.

-----------------------------------
do_pete
Thu May 11, 2006 6:06 pm


-----------------------------------
Also Math.DistancePointLine is useful when dealing with line segments when getting to more complex shapes.

-----------------------------------
monkeynamedsteve
Thu May 11, 2006 6:08 pm


-----------------------------------
Do you guys think that those math functions would be any help in Pacman. Sorry to leech off this thread.

-----------------------------------
do_pete
Thu May 11, 2006 6:11 pm


-----------------------------------
Not really, it would be better to use a 2D array.

-----------------------------------
monkeynamedsteve
Thu May 11, 2006 6:14 pm


-----------------------------------
Alright, thanks. 
And now back to The Helicopter program.
Pretend I was never here.

-----------------------------------

Thu May 11, 2006 9:09 pm


-----------------------------------
I can tell your still here.
