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 / x and y location

Author
Message
3beth
21
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 25th Apr 2004 18:51
This is a simple one but I forgot how to do it. How do you get the x and y position of a moving object? Say

load object "cornelia003.3DS",65 :
position object 65,+800,155,+1500
move object 65,+2

now i've done it several times but I can't find my example. What do i need to write to keep up with its changing position value, so I know when it crosses position +3500 to +4000, i dont want to use the dist_obj(65,XX)
i need the one thats similiar to this

x# = some value
y# = some value 2
thanks beth

Beth=The ditsy blonde. I like men and programming, but mainly programmed men!
DDD Productions
21
Years of Service
User Offline
Joined: 14th Mar 2004
Location: On Earth
Posted: 25th Apr 2004 19:11
Use:

x#=object position x(65)
y#=object position y(65)

D.D.D Productions
Specializing in game creation
3beth
21
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 25th Apr 2004 19:18
DDD PProductions,

Many many thanks, when you wrote it I remembered it. I have looked in every file I had and couldn't find it. I can't believe I forgot how to write that.

xoxox
Beth

Beth=The ditsy blonde. I like men and programming, but mainly programmed men!
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 25th Apr 2004 20:42
As a refresher, Y is usually used as height so X and Z are the left/right and near/far values. Get used to using XZ to position an object on a map or other terrain feature and then using intersect object or get ground height to determine the Y value.
--
TAZ

Login to post a reply

Server time is: 2025-05-23 11:50:27
Your offset time is: 2025-05-23 11:50:27