Shooting Game with Pictures as Targets --- need help!
Author |
Message |
Vin90
|
Posted: Fri Jan 04, 2008 5:09 pm Post subject: Shooting Game with Pictures as Targets --- need help! |
|
|
My game is basically shooting targets but my targets are pictures, in my case, Power Rangers, drawn on the paint program. I know how to input them into the Turing program, but what I don't understand is how to shoot them and then cls the screen. I know it has to do with mousewhere but I'm not sure exactly what to do. Also, i want to be able to shoot more than one Power Ranger on the screen. All i need help is with the mousewhere part for multiple targets. I've been trying to look for a tutorial on shooting pictures...but I didn't seem to have much luck. If anyone can please help me or show me where to look, I'd appreciate it greatly. Thanks! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Gooie
|
Posted: Sat Jan 05, 2008 12:49 am Post subject: Re: Shooting Game with Pictures as Targets --- need help! |
|
|
Can I see what you have so far? |
|
|
|
|
|
Vin90
|
Posted: Sat Jan 05, 2008 2:14 pm Post subject: Re: Shooting Game with Pictures as Targets --- need help! |
|
|
code: | View.Set ("graphics:500,500")
%Fonts
var font1:int:= Font.New ("Times New Roman:24")
%Power Rangers
var redpr :int := Pic.FileNew ("redpr.jpg")
var bluepr : int := Pic.FileNew ("bluepr.jpg")
var pinkpr : int := Pic.FileNew ("pinkpr.jpg")
%Power Ranger X Y Values
var redx:int:=100
var redy:int:=100
var bluex:int:=300
var bluey:int:=300
var pinkx:int
var pinky:int
% Other variables
var count:int:=0
var num : int := 0
var x,y: int
var mx, my, mb:int
%Intro Screen
Draw.FillBox (150,50,250,100,black)
Font.Draw ("Start", 170,60, font1,white)
%Starter for clicking
loop
mousewhere (mx,my,mb)
if mb=1 and mx > 150 and my > 50 and mx <250 and my <100 then
cls
count:=count+1
end if
exit when count = 1
end loop
%level1
Font.Draw ("level 1", 100, 100, font1, black)
delay (655)
cls
Pic.Draw (redpr, redx, redy, picCopy)
Pic.Draw (bluepr, bluex, bluey, picCopy)
loop
mousewhere (mx, my, mb)
if mb = 1 and mx > redx and my > redy and mx < redx + 131 and my < redy + 142 then
delay (100)
cls
num := num +1
locate (1,1)
color (red)
put "Power Rangers Killed: ", num
elsif mb = 1 and mx > bluex and my > bluey and mx < bluex + 131 and my < bluey + 142 then
delay (500)
cls
num := num + 1
locate (1,1)
color (blue)
put "Power Rangers Killed: ", num
delay (500)
exit
end if
end loop
|
That's all i have so far. I'd like to cls the screen each time I click a target. Right now, there are only 2 power rangers, and i still can't get them working. I'd also like to put in a timer and score, but if you can just help me on the targets for now, that would be wonderful. |
|
|
|
|
|
TokenHerbz
|
Posted: Sat Jan 05, 2008 3:19 pm Post subject: RE:Shooting Game with Pictures as Targets --- need help! |
|
|
really you only need one cls. thats in the main loop. Have a View.Update also, it'll make it good |
|
|
|
|
|
Vin90
|
Posted: Mon Jan 07, 2008 4:22 pm Post subject: Re: RE:Shooting Game with Pictures as Targets --- need help! |
|
|
TokenHerbz @ Sat 05 Jan, 3:19 pm wrote: really you only need one cls. thats in the main loop. Have a View.Update also, it'll make it good
Hmm. so you mean, put all the mousewhere coding for the power rangers together, and after that, just put one cls? okie, I'll try that. thanks! :] |
|
|
|
|
|
|
|