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 to move a object left and right?

Author
Message
Necrum
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location:
Posted: 2nd Jan 2003 23:56
How to do it using the left arrow key and right arrow key?
Just when you thought life was done beating your sorry ass down, it invites friends to help.
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 3rd Jan 2003 00:06
rotate it 90 degrees, move it with move object, then rotate it back to normal before the sync.
Necrum
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location:
Posted: 3rd Jan 2003 01:20
whats the syntax?

Just when you thought life was done beating your sorry ass down, it invites friends to help.
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Jan 2003 01:53
I use INC and DEC

load object "myobject.x",1
x= 10

do
if leftkey()= 1 then dec x,1
if rightkey()=1 then inc x,1
position object x,0,0
loop

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Necrum
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location:
Posted: 3rd Jan 2003 06:39
sync on
sync rate 30

make object sphere 1, 100
do
if upkey()=1 then move object 1, 5
if downkey()=1 then move object 1, -5
left key???
right key???
loop
end


im still pretty lost on left and right

Just when you thought life was done beating your sorry ass down, it invites friends to help.
ChronicFear
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 3rd Jan 2003 08:01
There are tutorials for this

Your suffering cause of me its divine
-Korn-
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 3rd Jan 2003 09:01
if leftkey()=1
perform action
endif

type that then press f1 while the focus is over the word leftkey

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Jan 2003 22:33
My code still works my friend Read the definition of INC and DEC for more info. Under the Math commands.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Necrum
21
Years of Service
User Offline
Joined: 31st Dec 2002
Location:
Posted: 3rd Jan 2003 22:37
Yeah, I got it now, thanks for all the help everyone.

Just when you thought life was done beating your sorry ass down, it invites friends to help.
rockabillypete
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location:
Posted: 4th Jan 2003 00:53
hi
i used your exsample and got it to move up and down but not left and right. Is that where you talk about dec and so on. im new to this. nice to meet you

Login to post a reply

Server time is: 2024-11-23 20:46:42
Your offset time is: 2024-11-23 20:46:42