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 / A newb question for a semi-seasoned programmer......

Author
Message
The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 24th Jul 2004 05:38
Hi, I'm making a space shooter in DBC!, but I
have a slight problemo. You see I have stored
mousemovex() like this (in the loop of my game)
cy#=wrapvalue(cy#+mousemovex())
then a few more lines down
I put...
Yrotate object 3,cy#
when I run this I have exactly what I wanted,
my object rotates accordingly to the mouse's x coordinate but
theres one problemo it is way to fast
How would I slow it down???
I'm using DBC V.1.13 Enhanced
on a windows 98 computer with a VooDoo 3

"Nintendo GameCube is the best"
"I'm back! and Darker than ever!!!"
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 24th Jul 2004 05:44
Yrotate object 3,cy#/2

-Ilya
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 24th Jul 2004 08:44 Edited at: 24th Jul 2004 08:46
I think you just need to do this...
cy#=wrapvalue(cy#+(mousemovex()/2))

...well... I hope I helped...

[edit]
you may also want to reposition the mouse at the center of ther screen every loop so it doesn't reach the edge of the screen and stop...
Position Mouse 320,240

The computer isn't an addiction, its more of a mental and social dependancy.
The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 24th Jul 2004 08:59
Duh what a simple solution well thanks for the help guys!

"Nintendo GameCube is the best"
"I'm back! and Darker than ever!!!"
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 24th Jul 2004 10:49
Heh-hehe. yeah, the simple ones are the hard ones to find.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2024-11-27 01:33:23
Your offset time is: 2024-11-27 01:33:23