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 / Need assistance with Random Hidden .X placements within confined area

Author
Message
Katyman
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 17th Oct 2013 17:13
I am looking right now for a way to setup say "Ghost.x" Object using Ghost Object On and Hide Object (Ghost id#) to appear within a room say 100x100 size (varies) right in front of the camera. I need a way for the "Ghost" to appear right in front of the Camera/player POV but it only happens randomly within the room. So what I need is a formula to create the PX# and PZ# (PY# is constant) and that it far enough from other objects including the walls (Static .dbo). Or maybe just a hidden random trigger point that once detected with Collision will run the script to make the Ghost.X appear. The Camera Radius is 15.0. I know there is a simple way to do this but I am having no luck nailing it down right now.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Oct 2013 19:39
Not sure what you need, but you could position this object in camera position x,y,z and move object , let say 10 units....or pehaps lock object on and apply ghost and fade.

I'm not a grumpy grandpa
Katyman
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 17th Oct 2013 23:01
Let's says you walk into a room with your player. If there was a "static" trigger, then the player will always know a "ghost" was there and avoid triggering it. I need a way to setup a dynamic and random trigger in the room so the "ghost" appears but never at the same location or even if someone crosses the room. A surprise appearance.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 17th Oct 2013 23:12
In that case, you've got the solution...just randomly, so even the programmer doesn't know where the ghost is goning to be.

I'm not a grumpy grandpa
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 24th Dec 2013 09:40
Sounds pretty straight forward you know the dimensions and coordinates of the room and its 100x100 so something along these lines maybe.

crude but effective sorry its late ready for zzzzzzs lol

A child's dream never dies.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 24th Dec 2013 16:34
Two ways I can think of off the top of my head...

1. Have a list of available positions and ranges of positions where the ghost could appear to meet your criteria (you can generate the list once and save to a file for later use), then set the position to a random place within that list.

2. Don't preset the ghost's position at all, set a preset random time instead (choose a frame at random), and have the ghost show up at wherever the player is at that time ~if~ you first check for collision conflicts when that occurs and it passes inspection. If it fails, then pick another random frame for the remainder of the game. Once the ghost shows up, then store its location, so it will be consistent throughout the rest of the game (if that's what you want).

Q: ...you mean computer imagery was still based on the paradigm that the world was flat? Even into the 21st century??? Talk about doing something the hard way!

A: Yep! Back then people would render simple shapes with complex meshes of thousands of flat little triangles. Next to the bottleneck processors they used, it's the main reason why their computers were so slow. In the last days of the religious atmosphere of centralization and trade, corporate dogmas had people believing that flat was faster.
Katyman
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 24th Dec 2013 17:59
Thank you all!! Now my immediate concern is using the CAMERA and ROTATE OBJECT commands. When I encounter the Ghost, I want my POV to slowly rotate to the Ghost Object while the Ghost Object immediately faces me. I can not get my POV to turn but instantly instead of turn normally to face the Ghost.

Login to post a reply

Server time is: 2024-11-23 15:07:50
Your offset time is: 2024-11-23 15:07:50