Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Walking on a 2D

Author
Message
Cookyzue
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 13th Nov 2003 23:57
im making a game like worms and i have the landform made and it has mountains and such... i need to know how to make it so the charactor, a sprite, can walk on this.like go up and down with the mountains.Thanks.
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 14th Nov 2003 03:16
dunno if you can use a get ground height command in 2d...can you?
if you can try that

http://www.freewebs.com/ingamers
load image "sp1.bmp",1
paste???? 2d games = fun....teach me
Cookyzue
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 14th Nov 2003 03:21
i got it!

if sprite collision(1,2)=0 ;
repeat
inc ypos,2
sprite 1,xpos,ypos,1
until sprite collision(1,2)=1
endif

if sprite collision(1,2)=1 ;
repeat
dec ypos,2
sprite 1,xpos,ypos,1
until sprite collision(1,2)=0
endif

i just put that in the if leftkey() and in if rightkey()
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 15th Nov 2003 19:20
good for you =)

http://www.freewebs.com/ingamers
load image "sp1.bmp",1
paste???? 2d games = fun....teach me

Login to post a reply

Server time is: 2024-05-08 16:47:25
Your offset time is: 2024-05-08 16:47:25