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 / DBPRO: How can I have objects face camera regardless of direction? - Need Help.

Author
Message
OLDTom
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location:
Posted: 14th Apr 2005 02:42
Good day!

I am working on a game to share with the DB community and I need some help.
Item 1:
When the camera approaches a dark corridor and enters, a ghost (ghost.x)appears and starts battle, however it is facing the wrong way depending on the direction I am heading, usually facing south.
IF I am in an Open room, all the objects face south. How can I get the Object(s) to face me regardless to the direction I am going. Please note that the object(s) are "stationary". I know enough to use a ROTATE OBJECT command but I can not figure out the coding.

Item 2 (see sniplet):
After the "ghost" is defeated, the PLAY OBJECT runs to show the ghost "dying". Works great! However IF I want to hide or remove the object AFTER the death scene, the Play Object is never seen, the ghost just vanishes after it is defeated. How do I setup PLAY OBJECT and HIDE or REMOVE OBJECT so that as soon as the Play is finished, hide or delete the "ghost"?

I know the code is not perfect but it is only in training and test mode now. I used the DC.EXE Map Tool for now to generate the maps of the play field and will hand draw the map at a later date.

Any help you can give me I would appreciate. Any suggestions?

Old Programmer's are not ugly; they are just Visually BASIC.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Apr 2005 04:42
1....point object camera position x(),camera position y(),camera position z()

2...if object playing(Object)=0 then hide object Object

hope thats some help.

Mentor.

PC1:XP, P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro, 6 way sound.
PC2: Linux, AMD 2ghz, 512mb ram, Nvidia GeForce4mx, 16 bit SB.
PC3: XP, laptop, intel 2.6ghz celeron, ATI 9000igp, 256mb
OLDTom
20
Years of Service
User Offline
Joined: 28th Jul 2004
Location:
Posted: 14th Apr 2005 04:52
Thank You!

It's all so simple when you know how I guess.

I was putting the cart before the horse and trying to do crazy math to figure out positions and rotations before.

Never hand me a lit match or a pair of sissors LOL.

PS: I never saw that command "Object playing" in the commands help. I wonder what other commands I am missing out on?

Old Programmer's are not ugly; they are just Visually BASIC.

Login to post a reply

Server time is: 2024-09-23 17:18:16
Your offset time is: 2024-09-23 17:18:16