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 Discussion / Help with object

Author
Message
CIA
19
Years of Service
User Offline
Joined: 25th Feb 2006
Location:
Posted: 7th Mar 2006 05:30
Hello everyone,

I am getting hard time to code. I was trying to code the object,

I mean,
how do I make the oject stop the rotate x when it go
5 degrees or -5 degrees and no more then 5 degrees
or no less then -5 degrees?
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 7th Mar 2006 20:57
right, how i would do it is use variables.

rem 1 is your object number
object=1

rem store the object angle (1) in this variable
angleY# = Object angle Y(1)

rem move the object forward if you want
If Upkey()=1 then Move object 1,5

rem now rotate the object the angle that it is stored in
If Leftkey()=1 then Yrotate object 1,Wrapvalue(angleY#-5)
If Rightkey()=1 then Yrotate object 1,Wrapvalue(angleY#+5)


try that method. Post back if you are confused.
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 7th Mar 2006 21:18 Edited at: 7th Mar 2006 21:18
nah that rotates it, it needs to stop rotationg a (-)5 degrees.



Don't look at my sig!
CIA
19
Years of Service
User Offline
Joined: 25th Feb 2006
Location:
Posted: 8th Mar 2006 01:25
That what I'm looking for.
Thank you very much for help, "pro g r amer" and "Link102"
Cia,

Login to post a reply

Server time is: 2025-05-23 12:54:05
Your offset time is: 2025-05-23 12:54:05