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.

DarkBASIC Professional Discussion / turning an object doesn't work

Author
Message
oblivion 2
22
Years of Service
User Offline
Joined: 5th Nov 2003
Location:
Posted: 5th Nov 2003 19:18
if I use this:

make object box 1,20
do
if leftkey()=1 then angely#=wrapvalue(angely#=5.0)
loop

what am i doing wrong?
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 5th Nov 2003 19:26
you never tell the program to rotate the object!
just put

'yrotate object 1,angley#'

just after the 'if leftkey()' part and before the 'loop'


Go on, click on my signature image, you know you want to
Favourite smiley>>>
oblivion 2
22
Years of Service
User Offline
Joined: 5th Nov 2003
Location:
Posted: 5th Nov 2003 20:00
i'm very sorry but it still doesn't work
i wrote this down

make object box 1,20
do
if leftkey()=1 then yrotate object 1,angely# : angely#=wrapvalue(angely#=5.0)
loop
oblivion 2
22
Years of Service
User Offline
Joined: 5th Nov 2003
Location:
Posted: 5th Nov 2003 20:24
can someone please explain it more in detail for me?
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 5th Nov 2003 20:31
make object box 1,20
do
if leftkey()=1
angely#=wrapvalue(angely#+0.5)
yrotate object 1,angely#
loop
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 5th Nov 2003 20:32
sorry..forgot endif..

make object box 1,20
do
if leftkey()=1
angely#=wrapvalue(angely#+0.5)
yrotate object 1,angely#
endif
loop
Genesis Rage
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location:
Posted: 5th Nov 2003 20:38
or if you are using DarkBASIC Pro...

make object cube 1, 20
do
if leftkey() = 1 then yrotate object 1, object angle y(1) + 0.5
loop

with DBP you dont have to use the wrapvalue... it does it automatically!

oblivion 2
22
Years of Service
User Offline
Joined: 5th Nov 2003
Location:
Posted: 5th Nov 2003 20:40
oke tanx for helping me out

Login to post a reply

Server time is: 2026-07-26 16:04:12
Your offset time is: 2026-07-26 16:04:12