PDA

View Full Version : rts


Faust
09-05-2009, 02:18 AM
I'm making an rts for my school project on darkbasic pro and I really need help with the drag-box-and-right-click-somewhere-else-on-the-map-commands. I'm very sorry if this has been asked before but I am desperate!

v71
09-06-2009, 02:03 AM
I think you have a scaled version on the map, all you need is to locate the point on the small map when you click the button and then scale again
to locate on the big map, now you have a vector running from the current position to the new on the big map, with that vector you can do anything you want, in particular scrolling the map in that direction.
for the drag box, you have to unproject coordinates from 3d to 2d , then you draw the box on the screen, project that box on the map and runs a function to see which units are inside the bounding box you have created unprojecting the original 2d box, extruded to infinity in 3d.
i hope i ahve been clear enough, english is not my first language

Faust
09-12-2009, 05:08 AM
I dont have any small maps. How would you scale it?