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.

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 00:36
how can i make an object move from A to B in straight line? seems straight forward but i want to have a function that will make any object (or camera) find nearest object that presents point B and move to it, can someone help?
Mugen Wizardry
User Banned
Posted: 16th Aug 2011 00:38
Create Waypoints

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 00:41
what i want is to make object get to waypoint but how can i do this?
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Aug 2011 01:52 Edited at: 16th Aug 2011 01:53
The "point object" command will direct it correctly then you can simply use the "move object" to move towards it.

EDIT: to find the distance between the two objects too you can use the distance formula: dist = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)

Warning! May contain Nuts!
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 02:09
but if i wanted my object to face different direction like when character is walking backwards or strafing then what? move object doesn't take coordinates
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 16th Aug 2011 02:37
You can use the new commands "Move object left", "move object right", "Move object up" and "Move object down" commands too.

Warning! May contain Nuts!
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 16th Aug 2011 03:54
Aren't those part of the Matrix1Utils or did they get integrated?

To move backwards, give the Move Object command a negative value.

Mugen Wizardry
User Banned
Posted: 16th Aug 2011 04:30 Edited at: 16th Aug 2011 04:31


works with W/A/S/D, and Up/Down/Left/Right

there, problem solved. good night

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 16th Aug 2011 06:44
I'm working on an "Object Queue" arrangement, where a function called lets say, Move_Object(), or Flip_Object() is given a queue list to monitor. As the game progresses and certain conditions are met, the "Object List" fills up with object numbers all queuing one after the other, and the corresponding functions that monitor those lists kick into gear.

For example, the function will detect objects 3, 5 and 7 on the list, and in that order, will apply it's self to modify those objects. Once the function has fully completed each object, lets say flipped an object around by 180°, it'll then mark that item off of the list so that object will no longer processed.

I'm still fairly novice at DBpro, but I'm guessing that my logic should work for what's being discussed here? I have it semi-working in my current project, but what's stopping me from finalizing this, is I'm not sure whether to have a static array list and thus write my own house keeping to manage the static array, OR, whether I should use the dynamic array list commands, such as the below;

Add to queue Select_Queue()
Select_Queue() = Mouse.Object_Hover

I'm finding that a dynamic system requires a little more logic, as the array is actually shrinking and growing. If the function isn't spot on with technique, it'll try accessing an array entry that doesn't exist and will error out.

So further to this, anyone got any tips for developing a queue system?

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 16th Aug 2011 13:25
I hope this helps:

Login to post a reply

Server time is: 2026-07-11 07:06:06
Your offset time is: 2026-07-11 07:06:06