Need Help With Movement!!!!!!
Author |
Message |
MikeJake
|
Posted: Fri Feb 06, 2009 11:24 am Post subject: Need Help With Movement!!!!!! |
|
|
We want help getting movement into our Game
So far the game looks like this (see Below)
If you have any tips that would help us feel free.
Turing: | %%%The Army Game%%%
%By: Mike Orr and Jake Klassen%
import GUI
var User_XP : real
var User_CurrentHealth : real
var User_Level : int := 1
var User_NextLevel : real
var WeaponDamage : int
var Weapon : string
GUI.SetBackgroundColour (green)
procedure Start
GUI.Quit
end Start
var b1 := GUI.CreateButton (120, 250, 10, "Start Game", Start )
loop
exit when GUI.ProcessEvent
end loop
cls
put "Its Time To Fight"
put skip
var Name : string
put "Enter your soldier's name. " ..
get Name : *
var Gender : string
loop
put "Enter your Gender: " ..
get Gender
exit when Gender = "Male" or Gender = "Female"
end loop
var Specialty : string
loop
if Gender = "Male" then
put "Choose your specialty from the list below"
put "Engineer"
put "Infantry"
put "Communications"
put "Armoured"
put "Artillery"
put "Medic"
put "Military Police"
put "Airborne"
put "Ammunition Technician"
put "Scottish Infantry"
put " " ..
get Specialty
exit when Specialty = "Engineer" or Specialty = "Infantry" or Specialty = "Communications" or Specialty = "Armoured"
or Specialty = "Artiilery" or Specialty = "Medic" or Specialty = "Military Police" or Specialty = "Airborne"
or Specialty = "Ammunition Technician" or Specialty = "Scottish Infantry"
end if
if Gender = "Female" then
put "Choose your specialty from the list below"
put "Communications"
put "Artillery"
put "Medic"
put " " ..
get Specialty
exit when Specialty = "Communications" or Specialty = "Artillery" or Specialty = "Medic"
end if
end loop
cls
var Corps : string
put "Choose your Corps. or Division"
put "Marine Corps."
put "Canadian Army"
put "Army Cadet"
put " " ..
get Corps : *
var Regiment : string
if Corps = "Canadian Army" then
put "Choose a regiment"
put "The Essex and Kent Scottish"
put "The Lake Superior Highlanders"
put "The Black Watch Royal Highland Regiment of Canada"
put "Princess Patricia's Canadian Light Infantry"
put "Royal Canadian Electrical and Mechanical Engineers"
put "Royal Canadian Field Ambulance"
put "Lord Strathcona's Horse"
put "Royal Canadian Horse Artillery"
put "Canadian Military Police"
put "Canadian Signal Corps."
put "Royal Canadian Regiment"
put " " ..
get Regiment
if Corps = "Marine Corps." then
put "Choose a company."
put "Alpha"
put "Bravo"
put "Charlie"
put "Delta"
put "Echo"
put "Foxtrot"
put "Gulf"
put "Hotel"
put "India"
put "Juliette"
put "Kilo"
put " " ..
get Regiment
if Corps = "Army Cadet" then
put "Choose your corps."
put "59 LHRC(ARMY)CC"
put "1084 Walkerville Legion"
put "CC 04 Blackwatch"
put "#44 Port Perry"
put " " ..
get Regiment
end if
put "Choose your weapon"
put "Colt Canada C7"
put "Colt Canada C6"
put "Colt Canada C8"
put "Colt Canada C9"
put "Armalite M-14"
put "Armalite M-15"
put "Armalite M-16"
put "M1 Carbine"
put "Remmington .22, semi auto"
put "Daisy 853C"
put "Lee Enfield No. 7 Bolt Action, Rim Fire, 22 calibre Rifle"
put " " ..
get Weapon
cls
if Specialty = "Engineer" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 200
end if
if Specialty = "Infantry" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 1000
end if
if Specialty = "Communications" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 100
end if
if Specialty = "Armoured" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 400
end if
if Specialty = "Artillery" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 500
end if
if Specialty = "Medic" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 700
end if
if Specialty = "Military Police" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 350
end if
if Specialty = "Airborne" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 950
end if
if Specialty = "Ammunition Technician" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 470
end if
if Specialty = "Scottish Infantry" then
User_CurrentHealth := 100
User_XP := 0
User_NextLevel := 1250
end if
if Weapon = "Colt Canada C7" then
WeaponDamage := 30
end if
end if
end if
|
Mod Edit: Remember to use syntax tags! Thanks code: | [syntax="turing"]Code Here[/syntax] |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
corriep
|
|
|
|
![](images/spacer.gif) |
TheGuardian001
|
Posted: Fri Feb 06, 2009 3:29 pm Post subject: Re: Need Help With Movement!!!!!! |
|
|
You could start off by actually putting an attempt into movement... We aren't going to do this for you. That being said:
Movement, summarized.
code: |
check keypress
if up arrow pressed
object y variable +1
else if down arrow pressed
object y variable -1
else if right arrow pressed
object x variable +1
else if left arrow pressed
object x variable -1
end if
draw object
|
|
|
|
|
|
![](images/spacer.gif) |
|
|