Mouse Following Lock-On Help
Author |
Message |
Popalats
|
Posted: Sat Dec 02, 2006 3:31 pm Post subject: Mouse Following Lock-On Help |
|
|
I am new to turing but i know what i want to do for my first game. I wanna make a game when you basically have a menu. You make your bot (just a dot) in a menu when you basically hit check boxes to equip different weapons,legs,boosters and cores. As i write this post i am trying to comprehend what to start on but im basically lost. i want to make it network play (even though its probably really hard) so me and my friends have something to play at school on our free time and to use as my final project. All i need help on is how to make it network play and for the final project i have to use GUI's and everyone i know is having problems with it including me.
Main Things i need help with:
- A lock on box for missiles with a bullet aimer in the middle.
- Network play.
- GUI menu
Other things may be added if i cannot get them to work. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Clayton
|
Posted: Sat Dec 02, 2006 3:37 pm Post subject: (No subject) |
|
|
Its very hard for us to help you if you dont:
- Give a detailed description of your problem
- Give an idea of what your problem is
- Post your code
Giving us these things will make it much easier for us to help you. |
|
|
|
|
|
Popalats
|
Posted: Sat Dec 02, 2006 4:41 pm Post subject: (No subject) |
|
|
I am working on my code right now.
but i do have a problem. This is my code atm. How can i stop the flickering and to make it run smoother?
Also is it possible to make the parts an array?
code: |
import GUI
randomize
const C_C := 5
var Xm, Ym, Click, mousebutton : int
var FCS1, FCS2, FCS3, FCS4 : int
var FCS1W,FCS2W, FCS3W, FCS4W : int
var FCS1S,FCS2S, FCS3S, FCS4S : int
var CORE1, CORE2, CORE3, CORE4, CORE5 : int
var CORE1W, CORE2W, CORE3W, CORE4W, CORE5W : int
procedure MissileBox
drawline (Xm - 20, Ym, Xm - 5, Ym, 3)
drawline (Xm + 20, Ym, Xm + 5, Ym, 3)
drawline (Xm, Ym - 20, Xm, Ym - 5, 3)
drawline (Xm, Ym + 20, Xm, Ym + 5, 3)
drawbox (Xm - FCS1, Ym - FCS1, Xm + FCS1, Ym + FCS1, 3)
drawfilloval (Xm, Ym, 3, 3, 12)
end MissileBox
%Fire Controll System Lock Size
FCS1 := 30
FCS2 := 50
FCS3 := 75
FCS4 := 120
%Fire Controll System Weight
FCS1W := 140
FCS2W := 150
FCS3W := 100
FCS4W := 170
%Fire Controll Lock Speed
FCS1S := 1500
FCS2S := 1250
FCS3S := 1300
FCS4S := 500
%Core Ap Output
CORE1 := 3250
CORE2 := 4000
CORE3 := 3500
CORE4 := 5500
CORE5 := 7000
%Core Weight
CORE1 := 500
CORE2 := 550
CORE3 := 350
CORE4 := 600
CORE5 := 750
loop
cls
drawfilloval (10, 10, 10, 10, 23)
mousewhere (Xm, Ym, mousebutton)
locatexy (10, 350)
put "(", Xm, ",", Ym, ")"
locatexy (10, 330)
MissileBox
delay (10)
View.Update
end loop
|
Also the program doesnt work is i set it to graphics.
Do you know how to fix that? |
|
|
|
|
|
uberwalla
|
Posted: Sat Dec 02, 2006 4:58 pm Post subject: (No subject) |
|
|
ok first of all the flickering problem is a main question always asked. u use view.update!
and as for array part let me read your code over and ill try but since ur numbers are different:
example:
FCS1S := 1500
FCS2S := 1250
FCS3S := 1300
FCS4S := 500
it would be hard. |
|
|
|
|
|
uberwalla
|
Posted: Sat Dec 02, 2006 5:02 pm Post subject: (No subject) |
|
|
ok i couldnt edit but here we go. i cannot see any part for arrays and as for gui menu well depending on what u need in it and how many menus it can make a big difference.
and theres also if ur having big trouble check out the tutorials section or help section for questions that may have already been answered.
also in the turing reference there is gui menu so just check it out there and add the stuff u need in there instead of the stuff they have and just make your procedures. |
|
|
|
|
|
Clayton
|
Posted: Sat Dec 02, 2006 5:30 pm Post subject: (No subject) |
|
|
all of your
code: |
var FCS1, FCS2, FCS3, FCS4 : int
var FCS1W,FCS2W, FCS3W, FCS4W : int
var FCS1S,FCS2S, FCS3S, FCS4S : int
var CORE1, CORE2, CORE3, CORE4, CORE5 : int
var CORE1W, CORE2W, CORE3W, CORE4W, CORE5W : int
|
can be incorporated into seperate arrays (ie CORE, COREW, FCS etc)
check out my tutorial on arrays in the [Turing Tutorials] section if you're not sure how to use arrays, also, check out wtd's Style Guidelines in the Turing Walkthrough, as your naming conventions are... unconventional. The animation flickering question is answered in my View.Set and View.Update tutorial which is also in the Turing Walkthrough. |
|
|
|
|
|
Popalats
|
Posted: Sat Dec 02, 2006 7:53 pm Post subject: (No subject) |
|
|
I've looked through the tutorials but i havent been able to find out how to get rid of that red circle under the mouse. Should i just draw a white one over it or can i actually get rid of it? |
|
|
|
|
|
Popalats
|
Posted: Sat Dec 02, 2006 9:12 pm Post subject: (No subject) |
|
|
Ive gotton a new problem. I need to have a delay for charging but if i put a delay the program stops. Is there a different command to disable a variable for a certain amount of time?
heres the coding for the charging
code: |
if chars (KEY_UP_ARROW) and chars (KEY_CTRL) and GENERATOR5 >= BOOSTERDRAIN4 and Charging = false then
ACy := ACy + LEGS3S + BOOSTER4
GENERATOR5 := GENERATOR5 - BOOSTERDRAIN4
end if
if chars (KEY_DOWN_ARROW) and chars (KEY_CTRL) and GENERATOR5 >= BOOSTERDRAIN4 and Charging = false then
ACy := ACy - LEGS3S - BOOSTER4
GENERATOR5 := GENERATOR5 - BOOSTERDRAIN4
end if
if chars (KEY_RIGHT_ARROW) and chars (KEY_CTRL) and GENERATOR5 >= BOOSTERDRAIN4 and Charging = false then
ACx := ACx + LEGS3S + BOOSTER4
GENERATOR5 := GENERATOR5 - BOOSTERDRAIN4
end if
if chars (KEY_LEFT_ARROW) and chars (KEY_CTRL) and GENERATOR5 >= BOOSTERDRAIN4 and Charging = false then
ACx := ACx - LEGS3S - BOOSTER4
GENERATOR5 := GENERATOR5 - BOOSTERDRAIN4
end if
if GENERATOR5 < 80000 and Charging = false then
GENERATOR5 := GENERATOR5 + GC5
end if
if GENERATOR5 > 80000 then
GENERATOR5 := 80000
end if
if GENERATOR5 < BOOSTERDRAIN4 then
Charging := true
end if
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|