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 / MouseOver commands in 3d

Author
Message
3beth
20
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 15th Feb 2004 16:21 Edited at: 15th Feb 2004 16:23
Another ditsy blonde request. I am putting objects in regular dark basic like listed below. Is there a simple way to write a mouse over command when you put the mouse over the 3d object to get an get image to appear with text over it like a talkbox and then dissappear after you remove the mouse. Also how do you make an object like below hard so your character will not pass through it.

Any thoughts would be great.

rem begin enemy5003 soldat
load object "sprites/enemy5003/enemy004.3DS",5003 :
position object 5003,landsize-600,10,landsize-5900
scale object 5003,4500,4500,4500 :
yrotate object 5003,180
load image "sprites/enemy5003/enemy001.bmp",5003
texture limb 5003,21,5003
load image "sprites/body/mafitlgt_enem_01.bmp",6001
texture limb 5003,20,6001
texture limb 5003,19,6001
texture limb 5003,18,6001
texture limb 5003,17,6001
texture limb 5003,16,6001
texture limb 5003,15,6001
texture limb 5003,14,6001
texture limb 5003,13,6001
texture limb 5003,12,6001
texture limb 5003,11,6001
texture limb 5003,10,6001
texture limb 5003,9,6001
texture limb 5003,8,6001
texture limb 5003,7,6001
texture limb 5003,6,6001
texture limb 5003,5,6001
texture limb 5003,4,6001
texture limb 5003,3,6001
load image "sprites/hands/righthand_lgt.bmp",50
texture limb 5003,1,50
load image "sprites/weapons/shield.bmp",98
texture limb 5003,3,98
load image "sprites/weapons/sword.bmp",99
texture limb 5003,2,99

rem Adjust enemy to ground height
gh#=get ground height(1,object position x(5003)-mx#,object position z(5003)-mz#)
position object 5003,object position x(5003),gh#+1.0,object position z(5003)
rem end enemy5003

Beth
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 15th Feb 2004 16:33
the command you need for the "mouseover" stuff is Pick Object() function in db pro. making objects "hard" refers to Collision commands - check help files on that.

-RUST-
"What the... Mooooooooooo!"
3beth
20
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 15th Feb 2004 16:51
Cattle Rustler,

I think i am using dark basic classic, the box doesn't really say,
it says 3D games Creator but i am pretty sure its not pro.
Ok on pick object, now I need to figure out how to make the 2d mouse find the 3d object, I am mapping the mouse x and y but its not going z, anymore thoughts.

Beth
sponge008
20
Years of Service
User Offline
Joined: 8th Feb 2004
Location: MA, USA
Posted: 15th Feb 2004 17:00
Oh, that's not Dark Basic, that's 3D Games Creator. It's point and click, right?
3beth
20
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 15th Feb 2004 17:13
No it not point and click, It was suppose to be dark basic classic, but the box doesn't say. It has a complier and looks like our version of classic back in the States but came in a wierd box.

I almost wish it was point and click at this point.

Beth
Brian T
20
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Western Massachusetts, USA
Posted: 15th Feb 2004 17:14
The nice thing about pick object is that it converts the 2D mouse to the 3D scene for you. It is a very useful function. I don't know if DB Classic has this function as I have only used DBP. If it does not, you may want to try using a ray command from the nuclear glory physics dll. It cost $15 but is well worth it. I just started incorporating it into my game yesterday. To make the "window" of information, you of course could just simply move a semi-transparent sprite (using set sprite alpha) centered around where the mouse is and then write your text over the sprite. If you want a fancier look with truly transparent text you could have a storage bitmap with the window background, write the text info to the storage bitmap, copy the bitmap to an image (you could vary the size of the window here too!), then make your semi-transparent sprite from the image and position it near the mouse pointer. Switching bitmaps seems to be a big performance lag so if you want your game to run smooth on slower computers you probably don't want to use this technique in your main game loop- but using it when a player is equiping their character with the game play paused would probably work nicely. Good luck.

* There is no experience like creating your own universe *
3beth
20
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 15th Feb 2004 17:22
OK Brian T,

I am following you, I think. I got my db while in england last week end, i am now back stuck in the Ukraine so I probably can't get the dll pack your talking about till i get back to the 21 century. Its 1960 here for the most part, I have to try something with what i have on hand and im pretty sure its classic. Got anymore suggestions. It bedtime but I will stay up longer. I want to get this going tonight if possible.

Beth
Brian T
20
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Western Massachusetts, USA
Posted: 15th Feb 2004 17:30
You can download it. You can even get the free trial version to get you started and to see if you like it. Here is the link:
http://www.nuclearglory.com/

* There is no experience like creating your own universe *

Login to post a reply

Server time is: 2024-09-21 21:09:49
Your offset time is: 2024-09-21 21:09:49