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 / Rotate Object

Author
Message
RobXVBGuy
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location:
Posted: 11th Feb 2004 00:53
I'm trying to use a smaller increment when rotating object:

IE:

do
x = 1
Rotate object 1, 0,x,0
x= x = .05
sync
loop

This is not working..I'm an VB Guy and in VB I would dimension the variable (Dim x as Double) to allow decimal numbers...Is this possible in DBPro?

Any help appreciated...
RobXVBGuy
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location:
Posted: 11th Feb 2004 00:54
Oops:

Code should read

do
x = 1
Rotate object 1, 0,x,0
x= x + .05
sync
loop
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 11th Feb 2004 01:23
Float variables have to be defined like:

x#=1
x#=x#+0.05

alternatively you can define a variable to be a particulat type:

x as float
x=1
x=x+0.05

Boo!
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 11th Feb 2004 02:56
use the latter imho

fltX as float = 1

-RUST-
"What the... Mooooooooooo!"
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 11th Feb 2004 08:28
also, instead of

x# = x# + 0.5

you can just do

inc x#,0.5



Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB
TheCyborg
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 11th Feb 2004 11:43
Do not EVER use Inc and Dec... They are (sometimes) bugged, especially when using decimals

Member of Tjald - Targeted Joint Addicted Liberation Diplomacy

I am (currently) 42% addicted to Counter-Strike. What about you?
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 12th Feb 2004 10:24
do you have any evidence of this? I've used the inc and dec commands on floats consistently in DBPro without every noticing any errors/inconsistancies.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2024-11-26 04:02:20
Your offset time is: 2024-11-26 04:02:20