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 / Possible to only change the X and Y position?

Author
Message
Stora tomtefar
20
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 16th Oct 2005 13:05
Hello!

I'm trying to make some kind of "train" in a game, which basicly is, at this moment, two objects of which the one in front of the second one is the leader which the second are following. They're moving at the same speed of ten (10), and the second object are always pointing towards the first one. The thing is; when you as the player are turning with the first object, the second always get a little more closer to it, until it collides with it.

Is it possible to do so that the second objects position alwas will be the first object Z position - 75, and have X and Y as the variables? (2X# = X#-75)

"Even though I'm ugly, I'm extreamly sexy!"
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 16th Oct 2005 16:49 Edited at: 30th Oct 2005 21:24
Can't you do:

It would look bad if the train turns around though.
Something like this would be better:

Also, if you want people to see the code, put it between these except without the space: [code ] [ /code]
http://forum.thegamecreators.com/?m=forum_view&t=62563&b=7

Edit: Reply to post below: No problem! (Don't want to bring this topic back from the dead...)


Check Profile for Links!!!
Stora tomtefar
20
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 21st Oct 2005 19:57
Will do, and thanks for your help!

"Even though I'm ugly, I'm extreamly sexy!"

Login to post a reply

Server time is: 2025-05-22 14:03:36
Your offset time is: 2025-05-22 14:03:36