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.

Newcomers DBPro Corner / pick object???

Author
Message
gareth
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Mar 2004 18:23
ive been looking through the forums about how to use the mouse to select a place for an object to move to, and the responses was use pick object, im thinking this a DBpro thing, as i have classic and it doesnt have that, how do you do it when using DBclassic to click the matrix and a unit will move to that point?
anyone?
GuruSY
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location:
Posted: 11th Mar 2004 05:26
Hey, I asked the same question, and Philip gave me some code that does it great. I use DBPro, but his code doesn't use pick object. The only thing you have to change is the global command (I believe) to DIM. Don't quote me on that since I never used DBClassic.

Philip's code is attached below.
diablo fan
20
Years of Service
User Offline
Joined: 7th Jan 2004
Location: michigan usa
Posted: 11th Mar 2004 08:18
gareth i dont know what kind of game your making but you can have a character face the direction of your mouse then when you click the mouse button use:

move object object number,speed

this has worked for me before

please dont make fun of my spelling,or sentence structure.Id rather study math or programming
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Mar 2004 13:49
If your happy with having your camera X angle locked at 55 (like OIE or Warcraft3) the code I posted on code snippets could work with DBC, just replace them globals. It has push scrolling, zooming, rotating, and click anywhere to position the sphere. Should be pretty easy to impliment.

Philips code is only for DBPro, it's impossible to get it working in DBC.


Van-B


The nature of Monkey was irrepressible!.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 13th Mar 2004 07:56
Er... VanB, I think "impossible" is pitching it a bit too high. Its not "impossible" in the sense that anyone with some knowledge of vector maths could write a set of bespoke functions in DBC which duplicates the built in vector functions in DBPro. For example:

null = make vector3(one)
set vector3 one, 2, 4, 6

is equivalent to the following code:

one = 1

TYPE vector3

x AS float
y AS float
z AS float

ENDTYPE

dim v(one) AS vector3

v(one).x = 2
v(one).y = 4
v(one).z = 6

I shall try and cover all this in my forthcoming tutorial. I may even try and write some bespoke functions to replicate the DBPro built in functions. That may help some people understand what is going on in the built in functions.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
Dmitry K
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 13th Mar 2004 17:51 Edited at: 14th Mar 2004 00:10
Hi

Quote: "
Er... VanB, I think "impossible" is pitching it a bit too high. Its not "impossible" in the sense that anyone with some knowledge of vector maths could write a set of bespoke functions in DBC which duplicates the built in vector functions in DBPro.
"


Already done.
DB Source: http://www.dmitr0s.newmail.ru/db/DBC_3DMaths.zip

Dll: http://darkbasicpro.thegamecreators.com/?m=forum_view&t=20490&b=5

RTS examples for DBC, DBPro P4 & U5 (Rus):http://www.dmitr0s.newmail.ru/db/RTS_Sources.rar

Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 14th Mar 2004 10:29
Dmitry, you're the man! Well done!

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home

Login to post a reply

Server time is: 2024-11-11 09:27:51
Your offset time is: 2024-11-11 09:27:51