Home   Help Search Login Register  

Author Topic: determining player's viewdistance  (Read 477 times)

0 Members and 1 Guest are viewing this topic.

Offline SEAL84

  • Members
  • *
  • Always lurking
determining player's viewdistance
« on: 04 May 2004, 23:46:25 »
Hey gang, another question for you

:tomato:

Is there a way to determine the player's viewdistance settings?  I've seen the benchmark command but it doesn't translate into anything useful...the comref says you can "estimate" the player's settings, but doesn't sound accurate enough.

I also know I can force a viewdistance on the player, but I'd rather not do that if I can avoid it.

If there's a way to determine the player's current viewdistance, I'm thinking I could use that in a script that places enemies when you're close enough to see them....this way I could make sure that there is no room for the player to see it happen, since the current script I have uses triggers and it would look really dumb if a player saw dudes spawning as he neared a position ;)

So is there any way to find this or am I better off forcing a viewdistance on the player?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:determining player's viewdistance
« Reply #1 on: 05 May 2004, 02:47:45 »
You could try forcing a view distance (faze into it slowly) just before the spawn occurs (so the player cannot see it) then faze into a higher view distance after the spawn (so it is not too abrupt a change as that would also look dumb).  If you do this you will have to use the benchmark command to make sure the increased view distance value does not exceed the user's computer capabilities.  But now that I think about it, if you are going to do this, you might as well, just do the benchmark and setviewdistance at the start of the game, then make sure all spawns happen outside that distance, which is probably what you were palnning on doing anyway.

It is strange to me that there is a "musicVolume" command that returns the music volume, but not a "viewDistance" command to return the view distance.

Offline SEAL84

  • Members
  • *
  • Always lurking
Re:determining player's viewdistance
« Reply #2 on: 05 May 2004, 03:22:13 »
Yeah, if there was no way to detect the viewdistance that's exactly what I was going to do.  

I guess I'll set it at the default 900m and set the spawn range at 1000m or so - the people with high-end machines won't like it, but I guess there's really no way around it :-\

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:determining player's viewdistance
« Reply #3 on: 05 May 2004, 18:48:00 »
If they have High end machines then make the script flexible so that if the benchmark is higher the view distance is higher and the spawn distance is higher.

Offline SEAL84

  • Members
  • *
  • Always lurking
Re:determining player's viewdistance
« Reply #4 on: 05 May 2004, 21:12:05 »
Good idea...

Of course I'd need to do a little polling to get a feel for how to interperet the benchmark...my laptop is my no means fast but my benchmark is like 50000.

I'll check it out.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:determining player's viewdistance
« Reply #5 on: 05 May 2004, 22:13:07 »
Seal, there's already such a thingy been released by Joltan
(if i remember right).

It's been for multiplayer and it was built to fit viewdistance
in multiplayer depending on the top most low spec participant
during such a game.

I've tried to find a link for you without success  :-[
but i'm pretty sure that if you send Terox a PM, he will
be able to point you into the right direction to find that, as
those two were buddies and i seem to reckon Terox at least
being involved in the thread where Joltan posted about it.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted