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.

Newcomers DBPro Corner / HOW do i make a moving platform

Author
Message
DAVIDangel
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: United Kingdom/Newcastle
Posted: 28th Nov 2003 00:41
hey guys i really need help im new to darkbasic......classic..............and i need help on making a moving platform for my platform game so any help would be greatly appreciated tutorials and/or examples please if you help your names will go into the credits of my finished game

'DGMC2003'
Clarks
20
Years of Service
User Offline
Joined: 30th Oct 2003
Location: BALTIMORE,MARYLAND
Posted: 28th Nov 2003 02:55
A moving platform. It depends on how you want the platform to move.
Something simple is:

sync on
sync rate 30

load object "level1platform.x",1
xspeed#=1

do
x#=object position x(1)
x#=x#+xspeed#
sync
loop

every game loop the level1platform should move 1 world unit in the x positive direction. That should be to the right of your screen. Of course its just a simple example but its depends on what you're looking for.
DAVIDangel
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: United Kingdom/Newcastle
Posted: 30th Nov 2003 01:40
thamx man

'DGMC2003'
Carlitos
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 30th Nov 2003 15:30 Edited at: 30th Nov 2003 15:32
Add this to make it go back and forth:



note:: I'm not shouting, its just the way I write my code.

This will make the object move back and forth like a moving platform. You can just change the distance to make go farther or shorter and the axis to make it go in different directions.



DAVIDangel
20
Years of Service
User Offline
Joined: 24th Nov 2003
Location: United Kingdom/Newcastle
Posted: 30th Nov 2003 17:57
CHEERS GUYS

'DGMC2003'

Login to post a reply

Server time is: 2024-09-21 11:35:24
Your offset time is: 2024-09-21 11:35:24