Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Beginner BeginnerMember since: 21.08.2011, 11:31Posts: 70Location: Sweden Likes: 0
 

 Post Topic: Changing pickup bounding box radius?
PostPosted 27.03.2012, 01:44 
I'm wondering, is it possible to change at what distance from for example a weapon (spawned weapon, not dropped by a player) or an ammo box the "pick up" icon is triggered to appear?

I'm also wondering if this is possible to affect at all through LUA scripting on a server. I tried with SetTriggerBBox() but that didn't seem to do anything, and from what I understand from the wiki here it's supposed to just add a new area box for whatever purpose you want to use it for.

The applications for it is simply that I want to make people have to be closer to guns to pick them up. I find it very unrealistic that the player can stand on something 2 shipping containers high, and pick up a weapon near the ground from up there. I'd like to shorten this distance for some specific level design situations, but maybe it's hardcoded into the game and unchangable?

  Beginner BeginnerMember since: 25.12.2009, 13:00Posts: 37 Likes: 2
 

 Post Topic: Re: Changing pickup bounding box radius?
PostPosted 14.05.2012, 16:13 
variable: g_playerInteractorRadius
type: float
current: 2
help: Maximum radius at which player can interact with other entities
User avatar   Beginner BeginnerMember since: 21.08.2011, 11:31Posts: 70Location: Sweden Likes: 0
 

 Post Topic: Re: Changing pickup bounding box radius?
PostPosted 20.05.2012, 09:41 
Quote by MalarzBetonu:
variable: g_playerInteractorRadius
type: float
current: 2
help: Maximum radius at which player can interact with other entities


Wow, thanks I didn't know there was such a variable. This must be exactly what I'm looking for.

However, I can't seem to change the value. Trying to update it in the console window only states that it is set to =2, and trying to put it in server.cfg doesn't seem to change it either.

Do you know how to change the default value for it?
  Beginner BeginnerMember since: 25.12.2009, 13:00Posts: 37 Likes: 2
 

 Post Topic: Re: Changing pickup bounding box radius?
PostPosted 20.05.2012, 12:28 
You must run game with -devmode parameter (all variables are enabled) or put in your
\...\Crytek\Crysis\Game\Config\diff_normal.cfg
It will work for singleplayer and multiplayer (only your own non-dedicated server)