
-----------------------------------
FredB
Mon Nov 07, 2016 10:31 am

Duck Hunt in Turing
-----------------------------------
What is it you are trying to achieve?
I am trying to make a game similar to Duck Hunt, I do not need to add any graphics to it, I just need the base of the game.


What is the problem you are having?
I don't know how to make my target (a square bouncing around the screen) a button in order for it to act like the duck. I also don't know how to put in a crosshair and a bullet system.


Describe what you have tried to solve this problem
I have tried using previous coding lessons to try and solve my issue but I am seriously confused.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)



View.Set ("title: Duck Hunt!, position: middle, middle, nobuttonbar")
var graphics : string
View.Set ('graphics:1280;720')
View.Set ("offscreenonly")


var xdir : int 
var ydir : int 
var xpos : int 
var ypos : int


xdir := 1
ydir := 2 
xpos := 50 
ypos := 100 



loop  
    cls
if xpos >= maxx or xpos = maxy or ypos = xpos and x = ypos and y = xpos and x = ypos and y = xpos and x = ypos and y 