I am trying to modify the jump game to a game for fat burning. If you get far enough in my game a pear comes down and if you collect it, you jump higher. The object number for that object is 5851. I am trying to create more objects just like that but different looks on them. I am also trying to make more come as well. If anyone knows what I mean could you please try to help? Thanks
//By Matija https://forum.thegamecreators.com/thread/188248
set display mode 800,600,32
sync on
sync rate 60
autocam off
hide mouse
set ambient light 35
color backdrop 0
OptionSection:
cls 0
load image "picture/titlepage.bmp", 781
ink rgb(0,0,0),0 : set text font "arial" : set text size 14 : set text to bold : set text transparent
do
REM SCREEN DISPLAY
REM CONTROL INPUT
paste image 781, 0, 0
if Keystate(scancode())=1 then gosub MainSection
REM REFRESH SCREEN
sync
loop
MainSection:
load image "picture/road.bmp",86
load sound "sound/loop.wav",94 : set sound volume 94, 75
load image "picture/jim.bmp",96
load image "picture/peartexture.bmp",82
PlayGame:
score = 0
gameover = 0
speed# = 0
speedy# = -10
dim platforms(20)
JumpBonusTimer# = rnd(500)+200
stepy = 0
stepx = 0
loop sound 94
make object box 1,30,5,10
position object 1,0,0,500
color object 1,rgb(255,255,0)
load object "object/dude.x",5850
scale object 5850,1000,1000,1000
rotate object 5850,0,90,0
texture object 5850,96
load object "object/pear.x",5851
texture object 5851, 82
scale object 5851, 1000,1000,1000
position object 5851,rnd(900)-450,400,500
make object box 5824,3000,2000,1000
position object 5824,0,0,2000
texture object 5824,86
for x = 2 to array count(platforms()) rem
make object box x,50,10,20
color object x,rgb(rnd(100)+100,rnd(100)+100,rnd(100)+100)
position object x,stepx,rnd(20)-50+stepy,500
inc stepy,50
stepx = rnd(720)-360
next x
do
scroll object texture 5824, 0, 0,-.003
set text size 26
set text font "impact"
ink rgb(217,224,21),0
center text 400,15,"Fat Burned: "+str$(score)
if object position y(1) => 50 and speedy# <= 0
for x = 2 to array count(platforms())
move object down x,speedy#*-0.8 rem stair speed
next x
move object down 1,speedy#*-0.8
if JumpBonusTimer# <= 0
move object down 5851,speedy#*-0.8
endif
endif
inc speedy#,0.2
if speedy# => 10 then speedy# = 10
speed# = speed#*0.93
move object down 1,speedy#
move object left 1,speed#
if leftkey() = 1
inc speed#,0.5
endif
if rightkey() = 1
dec speed#,0.5
endif
for x = 2 to array count(platforms())
if object collision (1,x) and speedy# => 0
speedy# = -7
endif
next x
position object 5850,object position x(1),object position y(1)+25,object position z(1)
if object position x(1) > 380
position object 1,380,object position y(1),500
endif
if object position x(1) < -380
position object 1,-380,object position y(1),500
endif
if object position x(5850) > 380
position object 5850,380,object position y(5850),500
endif
if object position x(5850) < -380
position object 5850,-380,object position y(5850),500
endif
for x = 2 to array count(platforms())
move object down x,1
if gameover = 0
if object position y(x) < -320
inc score,1
position object x,stepx,400,object position z(x)
endif
endif
stepx = rnd(720)-360
next x
if gameover = 0
endif
dec JumpBonusTimer#,0.35
if JumpBonusTimer# <= 0
move object down 5851,2
endif
if object collision (5850,5851)
speedy# = -20
position object 5851,0,-500,0
endif
if object position y(5851) < -320
JumpBonusTimer# = rnd(500)+200
position object 5851,rnd(900)-450,400,500
endif
if spacekey() = 1
JumpBonusTimer# = rnd(500)+200
score = 0
gameover = 0
speed# = 0
speedy# = -10
stepy = 0
stepx = 0
position object 1,0,0,500
position object 5850,object position x(1),object position y(1)+25,object position z(1)
for x = 2 to array count (platforms())
position object x,stepx,rnd(20)-50+stepy,500
inc stepy,50
stepx = rnd(720)-360
next x
position object 5851,rnd(900)-450,400,500
wait 50
endif
if object position y(1) =< -350 then gameover = 1
if gameover = 1
for x = 2 to array count(platforms())
move object down x,5
stop sound 94
next x
if JumpBonusTimer# <= 0
move object down 5851,5
if object position y(5851) < -320
JumpBonusTimer# = 999999999999
endif
else
JumpBonusTimer# = 999999999999
endif
endif
sync
loop
EndSection: