Computer Science Canada Simple Crosshair Movement- Help Needed |
Author: | skatelhs [ Thu May 22, 2003 9:59 pm ] | ||||
Post subject: | Simple Crosshair Movement- Help Needed | ||||
so, im making a game ( ) for compsci class, grade 10, final evaluation. Im doin somethin like that arcade game(like the ones in arcades), where you step on that thing and your character pops up, and you shoot. I'm not doin any poppin up actually, just people stop shooting you when you put your gun away. I'm not really too far along, I am just in the process of making the crosshair and noises. Heres the code I've got so far...
I had a few questions about it: 1) how do i get the loop to look un-crappy? Its so friggin sketchy you can barely see it. 2) does anyone have any suggestions on stuff that will make it better? 3) Whats with that last part:
If i leave out the "Then Exit" part it doesnt ever take the "weapon" out, when i'm actually trying to make the program close when i press it? Also, how do i make it exit, say, when the key "x" is pressed, and weapon comes out when key "enter" is pressed (pretty much already like that, just dont understand how i got there) any help would be much appreciated! adam |
Author: | Blade [ Fri May 23, 2003 7:53 am ] | ||
Post subject: | |||
ok. to make the weapon stay you you have to hold the enter key for now. so make a boolean variable to check to see whether its true (out) or false (holstered). make the loop look somethin like this
this is just saying if holster is false it wont ask to draw your weapon. but if its true then you can press enter to draw it. but if its true then press enter to holster it. to get rid of the crappy flashy if you are using version 4 of turing then you can use in your setscreen or View.Set "offscreenonly" ex: View.Set("offscreenonly") and View.Update to update your graphics to the screen. |
Author: | skatelhs [ Fri May 23, 2003 8:10 am ] |
Post subject: | |
I have no clue, whats this offscreenonly and viewupdate stuff? |
Author: | skatelhs [ Fri May 23, 2003 8:15 am ] |
Post subject: | |
also im getting some problems with yours, the "holster" in "holster := true and holster:=false, is highlighted and it says it wont be executed |
Author: | Homer_simpson [ Fri May 23, 2003 2:10 pm ] | ||
Post subject: | |||
this solves the crappy loop problem
i'll help u with the holster thing when i get home |
Author: | Blade [ Fri May 23, 2003 2:44 pm ] | ||
Post subject: | |||
yeah. i used yer's and added in the holster. i used getch because in this case Input.KeyDown was way too fast. you push the button and it goes off and on and off and on again. lol. it ran really slowly on my comp. maybe thats just cuz its a lil screwed and needs a reformat cuz i did something to it i wasn't supossed to but here ya go.
|