Posted: Wed Oct 29, 2008 7:59 am Post subject: another game (for a friend)
o.k i am working con a collab with a friend, A shooter-like program
stage1) get procedures for mouse x and y (completed)
stage2) make bad guys (completed)
stage3) make a [dot] for croshair (need help)
stage4) draw a dot on the screen at the mouse corr (need help)
stage5)killing them (complete sorta need help on other 2 to make rest of protocalls)
so if soeone could help us on stage 2 and stage3 that wold be greatly apprecieated
version of turing (4.1.1)
Sponsor Sponsor
ecookman
Posted: Wed Oct 29, 2008 8:00 am Post subject: RE:another game (for a friend)
srry if u can't read sign it says ill send the completed copy and some bits to the most helpful (the finished game will be available too)
Warchamp7
Posted: Wed Oct 29, 2008 8:00 am Post subject: RE:another game (for a friend)
It would help if you posted exactly what you're having problems with and what you've tried
ecookman
Posted: Wed Oct 29, 2008 8:19 am Post subject: RE:another game (for a friend)
lol i don't have all of it we are building it in chuns and mashing it together but here is my part:
Turing:
Mouse.ButtonChoose("multibutton") var x :int var y :int var button :int var none :int var left :int var middle :int var right :int
none :=0
left :=1
middle :=10
right :=100 loop Mouse.Where(x, y, button) locate(1, 1) put"X:", x, " Y:", y
if button = none then put"shoot! ", button
elsif button = left then put"blam! ", button
elsif button = middle then put"scroll wheel does nothing ", button
elsif button = right then put"Right click does nothing ", button
endif if x=90and y=120and button = left then drawfilloval(90, 120, 75, 75, red) endif endloop
ecookman
Posted: Wed Oct 29, 2008 8:20 am Post subject: RE:another game (for a friend)
ya so basically where:
if x=90 and y=120 and button = left then
drawfilloval(90, 120, 75, 75, red)
is we want that to be the x and y of the mouse and to have the mouse to be a small cicrcl
p.s. Full Metal Alchemist rules love u avvi
CodeMonkey2000
Posted: Wed Oct 29, 2008 8:54 am Post subject: RE:another game (for a friend)
Please use either the code or syntax tags when you post code next time. And about your problem, I'm not sure what you mean.
Warchamp7
Posted: Wed Oct 29, 2008 9:07 am Post subject: Re: RE:another game (for a friend)
ecookman @ Wed Oct 29, 2008 8:20 am wrote:
ya so basically where:
if x=90 and y=120 and button = left then
drawfilloval(90, 120, 75, 75, red)
is we want that to be the x and y of the mouse and to have the mouse to be a small cicrcl
What this code is going to do is draw a circle ONLY when the mouse is at x=90 and y=120 and when the mouse button is down.
Posted: Wed Oct 29, 2008 10:51 am Post subject: RE:another game (for a friend)
umm what is the z variable for
ecookman
Posted: Wed Oct 29, 2008 10:55 am Post subject: RE:another game (for a friend)
WOOT that worked now how do i mkae the mouse go away
pkjr92
Posted: Wed Oct 29, 2008 12:05 pm Post subject: Re: another game (for a friend)
I already had a template made for these games. Here it is:
code:
%Sniper Control Template
%Created by: Josh Guerette
%October 29, 2008
%This template is free to use as long as proper credit is givent to its creator
View.Set ("graphics, offscreenonly, nobuttonbar")
var x,y,c:int
var reload:int
reload:=0
var shots_left:int:=10
var key:array char of boolean
var alreadyshot:int
loop
alreadyshot:=0
colorback (black)
Text.Color (white)
mousewhere (x,y,c)
%put "x= ",x
%put "y= ",y
%put "click= ",c
View.Update
cls
put "Shots Left: ",shots_left
if c=1 and alreadyshot=0 then
shots_left-=1
alreadyshot:=1
delay (100)
end if
if shots_left=0 or shots_left < 0 then
shots_left:=0
put "Enter - RELOAD"
end if
if shots_left > 10 then
put "RELOADED"
shots_left :=10
end if
Input.KeyDown (key)
if key (KEY_ENTER) and shots_left = 0 then
shots_left:=10
Posted: Wed Oct 29, 2008 1:35 pm Post subject: RE:another game (for a friend)
z is for the status of the button (ie if the mouse is clicked down or not.)
[Gandalf]
Posted: Wed Oct 29, 2008 6:40 pm Post subject: Re: RE:another game (for a friend)
ecookman @ 2008-10-29, 10:55 am wrote:
WOOT that worked now how do i mkae the mouse go away
You can't. The mouse pointer is drawn by the Windows API, which Turing doesn't have access to. Of course, you could do it a roundabout way like Sys.Exec()ing a program that hides the mouse cursor for you, but that's more trouble than it's worth.
ecookman
Posted: Thu Oct 30, 2008 7:19 am Post subject: RE:another game (for a friend)
WELL THAT IS A PAIN INT THE BUTT
but thanks now i can stop googling
ecookman
Posted: Thu Oct 30, 2008 7:41 am Post subject: RE:another game (for a friend)
HMMMMM just tinking
is it possibl;e to load a background from a file to load it into turing