ok im making a fighting game its due tommorow and the only reason im behind is because my partner dropped the class so i been really short on time since. so can anyone help me figured out whats wrong?
ok i got collisions to work but once one character gets hit he is the only one who can get hit how can i: 1. get them to move at the same time. 2. how can i get it to be when one player gets hit then the other one can get hit.
REM Project: group project
REM Created: 3/22/2010 5:38:39 PM
REM
REM ***** Main Source File *****
REM
`loading bitmap
`get bitmaps
`cls
`ink
`sync rate 0
load bitmap "F:\group project GDP\GohandbzTitle.bmp", 4
copy bitmap 4, 0
set current bitmap 0
set text size 102
fcolor = RGB(0,0,0)
ink RGB(255,255,0),fcolor
center text 320,40, " Dragon Ball Z "
set text size 120
fcolor = RGB(255,255,255)
repeat
set text size 36
center text 320,440, " Press Spacebar To Continue "
until spacekey ()
cls
set image colorkey 0,0,0
delete bitmap 4
`sync on
`load bitmap "F:\group project GDP\namekmapp01.bmp", 3
`copy bitmap 3,0,0,800,600,0,0,0,640,480
`get image 85,1,1,799,599
`delete bitmap 3
`paste image 85,640,480,1
`copy bitmap 3,0
`sync rate 0
`sync on
`load image "sprite.png" 1,1
`load image "800x600_
`load music "F:\group project GDP\DBZ - Kid Buu's Theme.mp3", 2
`play music 2
`set music volume 2, 40
`stop music 2
load bitmap "F:\group project GDP\gohan moves\dbzgohancharacter moves3.bmp", 1
`punching
get image 1,4,116,66,217
get image 2,72,116,134,216
get image 3,139,116,229,216
get image 4,236,116,298,216
get image 5,303,116,365,216
`kicking
get image 6,5,222,67,324
get image 7,72,222,134,324
get image 8,139,223,201,323
get image 9,206,223,268,323
get image 10,273,223,335,323
get image 11,340,223,402,323
get image 12,407,223,469,323
get image 13,474,222,536,322
`sweep kick
get image 14,5,327,67,427
get image 15,72,327,134,427
get image 16,139,327,201,427
get image 17,206,327,268,427
get image 18,273,327,335,427
get image 19,340,327,402,427
get image 20,407,327,469,427
`dash
get image 21,6,537,68,635
get image 22,72,537,134,635
get image 23,139,537,201,635
get image 24,206,537,268,635
get image 25,273,537,335,635
get image 26,340,537,402,635
`backwards dash
get image 27,5,748,67,848
get image 28,70,748,136,848
get image 29,139,748,201,848
get image 30,206,748,268,848
get image 31,273,748,335,848
get image 32,340,748,402,848
get image 33,407,748,469,848
get image 34,473,748,535,848
`uppercut
get image 35,5,642,67,742
get image 36,73,642,135,742
get image 37,140,641,202,742
get image 38,206,641,268,741
get image 39,273,641,335,741
get image 40,340,641,402,741
get image 41,407,641,469,741
get image 42,474,641,535,741
`blocking
get image 94,6,432,68,532
get image 95,73,432,135,532
get image 96,139,432,201,532
get image 97,206,432,268,532
get image 98,273,432,336,532
get image 99,344,432,404,532
get image 100,408,432,470,532
get image 101,477,432,539,532
`getting hit
get image 102,5,851,67,952
get image 103,74,851,132,952
get image 104,139,851,201,952
`hit to the ground
get image 120,5,957,67,1057
get image 121,72,957,151,1057
get image 122,153,957,232,1057
get image 123,235,957,314,1057
get image 124,317,957,417,1057
delete bitmap 1
load bitmap "F:\group project GDP\inverted gohan\InVgohanMoves4.bmp", 2
`punching
get image 43,4,116,66,217
get image 44,72,116,134,216
get image 45,139,116,229,216
get image 46,236,116,298,216
get image 47,303,116,365,216
`kicking
get image 48,5,222,67,324
get image 49,72,222,134,324
get image 50,139,223,201,323
get image 51,206,223,268,323
get image 52,273,223,335,323
get image 53,340,223,402,323
get image 54,407,223,469,323
get image 55,474,222,536,322
`sweep kick
get image 56,5,327,67,427
get image 57,72,327,134,427
get image 58,139,327,201,427
get image 59,206,327,268,427
get image 60,273,327,335,427
get image 61,340,327,402,427
get image 62,407,327,469,427
`dash
get image 63,6,537,68,635
get image 64,72,537,134,635
get image 65,139,537,201,635
get image 66,206,537,268,635
get image 67,273,537,335,635
get image 68,340,537,402,635
`backwards dash
get image 69,5,748,67,848
get image 70,70,748,136,848
get image 71,139,748,201,848
get image 72,206,748,268,848
get image 73,273,748,335,848
get image 74,340,748,402,848
get image 75,407,748,469,848
get image 76,473,748,535,848
`uppercut
get image 77,5,642,67,742
get image 78,73,642,135,742
get image 79,140,641,202,742
get image 80,206,641,268,741
get image 81,273,641,335,741
get image 82,340,641,402,741
get image 83,407,641,469,741
get image 84,474,641,535,741
`blocking
get image 85,6,432,68,532
get image 86,73,432,135,532
get image 87,139,432,201,532
get image 89,206,432,268,532
get image 90,273,432,336,532
get image 91,344,432,404,532
get image 92,408,432,470,532
get image 93,477,432,539,532
get image 94,541,432,603,532
`getting hit
get image 112,5,851,67,952
get image 113,74,851,132,952
get image 114,139,851,201,952
`hit to the ground
get image 115,5,957,67,1057
get image 116,72,957,151,1057
get image 117,153,957,232,1057
get image 118,235,957,314,1057
get image 119,317,957,417,1057
delete bitmap 2
x=0
y=380
x2=500
y2=380
health = 10
health2 = 10
load music "F:\group project GDP\DBZ Themes - Goku Battles Android 19.mp3", 1
loop music 1
set music volume 1, 40
set image colorkey 0,0,0
sync rate 15
do
`Player1 actions
`dodging
sprite 1,x,y,94
if inkey$()= "c"
x = x - 20
sprite 1,x,y,94
wait .03
sprite 1,x,y,95
wait .03
sprite 1,x,y,96
wait .03
sprite 1,x,y,97
wait .03
sprite 1,x,y,98
wait .03
sprite 1,x,y,99
wait .04
sprite 1,x,y,100
wait .04
sprite 1,x,y,101
sync
endif
`punching
`cls
sprite 1,x,y,1
if inkey$()= "j"
x = x
sprite 1,x,y,1
wait .01
sprite 1,x,y,2
wait .01
sprite 1,x,y,3
wait .01
sprite 1,x,y,4
wait .01
sprite 1,x,y,5
if sprite hit(1,2)
health2 = health2 - 1
sprite 2,x2,y2,112
wait .03
if health2 = 0 then exit
sync
endif
endif
`foward dash
sprite 1,x,y,21
if inkey$()= "d"
x = x + 10
sprite 1,x,y,21
wait .01
repeat
x = x + 35
sprite 1,x,y,22
wait .01
sprite 1,x,y,23
wait .01
sprite 1,x,y,24
wait .01
until inkey$()="d" = 0
`until rightkey() = 0
sprite 1,x,y,25
wait .01
sprite 1,x,y,26
sync
endif
`backwards flip
sprite 1,x,y,27
if inkey$()= "a"
x = x - 10
sprite 1,x,y,27
wait .01
sprite 1,x,y,28
wait .01
repeat
x = x - 35
sprite 1,x,y,29
wait .01
sprite 1,x,y,30
wait .01
sprite 1,x,y,31
wait .01
sprite 1,x,y,32
wait .01
until inkey$()="a" = 0
sprite 1,x,y,33
wait .01
sprite 1,x,y,34
sync
endif
`uppercut
sprite 1,x,y,35
if inkey$()= "h"
x = x
sprite 1,x,y,35
wait .01
sprite 1,x,y,36
wait .01
sprite 1,x,y,37
wait .01
sprite 1,x,y,38
wait .01
sprite 1,x,y,39
wait .01
sprite 1,x,y,40
wait .01
sprite 1,x,y,41
wait .01
sprite 1,x,y,42
if sprite hit(1,2)
health2 = health2 - 1
sprite 2,x2,y2,114
wait .03
sprite 2,x2,y2,113
wait .03
if health2 = 0 then exit
sync
endif
endif
`kicking
sprite 1,x,y,6
if inkey$()= "k"
x = x
sprite 1,x,y,6
wait .01
sprite 1,x,y,7
wait .01
sprite 1,x,y,8
wait .01
sprite 1,x,y,9
wait .01
sprite 1,x,y,10
wait .01
sprite 1,x,y,11
wait .01
sprite 1,x,y,12
wait .01
sprite 1,x,y,13
if sprite hit(1,2)
health2 = health2 - 1
sprite 2,x2,y2,114
wait .03
if health2 = 0 then exit
sync
endif
endif
`Sweepkicking
sprite 1,x,y,14
if inkey$()= "l"
x = x
sprite 1,x,y,14
wait .01
sprite 1,x,y,15
wait .01
sprite 1,x,y,16
wait .01
sprite 1,x,y,17
wait .01
sprite 1,x,y,18
wait .01
sprite 1,x,y,19
wait .01
sprite 1,x,y,20
if sprite hit(1,2)
health2 = health2 - 1
sprite 2,x2,y2,115
wait .03
sprite 2,x2,y2,116
wait .03
sprite 2,x2,y2,117
wait .03
sprite 2,x2,y2,117
wait .03
if health2 = 0 then exit
sync
endif
endif
`Player2 actions
`punching
sprite 2,x2,y2,43
if inkey$()= "7"
x = x
sprite 2,x2,y2,43
wait .01
sprite 2,x2,y2,44
wait .01
sprite 2,x2,y2,45
wait .01
sprite 2,x2,y2,46
wait .01
sprite 2,x2,y2,47
if sprite hit(2,1)
health1 = health1 - 1
sprite 1,x,y,102
wait .03
if health1 = 0 then exit
sync
endif
endif
`foward dash
sprite 2,x2,y2,63
if leftkey() = 1
x2 = x2 - 10
sprite 2,x2,y2,63
wait .01
repeat
x2 = x2 - 35
sprite 2,x2,y2,64
wait .01
sprite 2,x2,y2,65
wait .01
sprite 2,x2,y2,66
wait .01
until leftkey() = 0
sprite 2,x2,y2,67
wait .01
sprite 2,x2,y2,68
sync
endif
`backwards flip
sprite 2,x2,y2,69
if rightkey() = 1
x2 = x2 + 10
sprite 2,x2,y2,69
wait .01
sprite 2,x2,y2,70
wait .01
repeat
x2 = x2 + 35
sprite 2,x2,y2,71
wait .01
sprite 2,x2,y2,72
wait .01
sprite 2,x2,y2,73
wait .01
sprite 2,x2,y2,74
wait .01
until rightkey() = 0
sprite 2,x2,y2,75
wait .01
sprite 2,x2,y2,76
sync
endif
`uppercut
sprite 2,x2,y2,35
if inkey$()= "8"
x2 = x2
sprite 2,x2,y2,77
wait .01
sprite 2,x2,y2,78
wait .01
sprite 2,x2,y2,79
wait .01
sprite 2,x2,y2,80
wait .01
sprite 2,x2,y2,81
wait .01
sprite 2,x2,y2,82
wait .01
sprite 2,x2,y2,83
wait .01
sprite 2,x2,y2,84
if sprite hit(2,1)
health1 = health1 - 1
sprite 1,x,y,104
wait .03
sprite 1,x,y,103
wait .03
sync
endif
endif
`kicking
sprite 2,x2,y2,48
if inkey$()= "4"
x2 = x2
sprite 2,x2,y2,48
wait .01
sprite 2,x2,y2,49
wait .01
sprite 2,x2,y2,50
wait .01
sprite 2,x2,y2,51
wait .01
sprite 2,x2,y2,52
wait .01
sprite 2,x2,y2,53
wait .01
sprite 2,x2,y2,54
wait .01
sprite 2,x2,y2,55
if sprite hit(2,1)
health1 = health1 - 1
sprite 1,x,y,102
wait .03
if health1 = 0 then exit
sync
endif
endif
`Sweepkicking
sprite 2,x2,y2,56
if inkey$()= "5"
x2 = x2
sprite 2,x2,y2,56
wait .01
sprite 2,x2,y2,57
wait .01
sprite 2,x2,y2,58
wait .01
sprite 2,x2,y2,59
wait .01
sprite 2,x2,y2,60
wait .01
sprite 2,x2,y2,61
wait .01
sprite 2,x2,y2,62
if sprite hit(2,1)
health1 = health1 - 1
sprite 1,x,y,120
wait .03
sprite 1,x,y,121
wait .03
sprite 1,x,y,122
wait .03
sprite 1,x,y,122
if health1 = 0 then exit
sync
endif
endif
`dodging
sprite 2,x2,y2,85
if inkey$()= "1"
x2 = x2 + 25
sprite 2,x2,y2,85
wait .01
sprite 2,x2,y2,86
wait .01
sprite 2,x2,y2,87
wait .01
sprite 2,x2,y2,88
wait .01
sprite 2,x2,y2,89
wait .01
sprite 2,x2,y2,90
wait .01
sprite 2,x2,y2,91
wait .01
sprite 2,x2,y2,92
wait .01
sprite 2,x2,y2,93
sync
endif
loop