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.

FPSC Classic Scripts / PICKOBJECT condition

Author
Message
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 23rd May 2010 14:57
I am writing a bunch of scripts using the pickobject condition and it doesn't work in all cases.

On pickup items it only works 100% if the item is on the ground and well if it is on a table. If it is on a shelf or somewehre else above player eyelevel it becomes hard or even impossible to target it.

with dynamic wall items on the other hand it works very good while some large static items (turned dynamic of course) work only if you target it from certain angels.

I suspect, that it has something to do with the collission method of the item (box or polygon) but I am more or less clueless.

Has anyone encountered the same things and can give me a hint or too?

PS: which mods (apart from fenix) include PICKOBJECT?

In case you find my grammar and spelling weird ---> native German speaker ^^
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th May 2010 02:35
Anything with AirMod should contain that command.


The one and only,


The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 24th May 2010 03:24
Thanks for the info.

In case you find my grammar and spelling weird ---> native German speaker ^^
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th May 2010 07:10
As for why it has issues with viewing at different angles, I think you're right that it could be related to the collision boxes used for entities. It could also pertain to different optimizations in play with FPSC, such as "turning off" objects that don't need to be active to save on performance?


The one and only,


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 24th May 2010 08:41
Quote: "It could also pertain to different optimizations in play with FPSC, such as "turning off" objects that don't need to be active to save on performance?"



I guess that really depends. Do recall if the ai subroutine and or command cases are called on a dormant entity?

Storyteller, do me a favor and set the entity to always active and tell me if you get better results.

The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 24th May 2010 13:39 Edited at: 24th May 2010 13:52
I did some further research last night and discovered 2 things:

1. Large entities generally seem to have a "targetable frame" thats considerably smaller than the "collision box"

I couldnt make the policecar from the store display a message with "pickobject" as long as I used "plrdistwithin=60" (which works for chars and weapon pickups)
As soon as I switched to "plrdistwithin=100" the message displayed when coming from the SIDE of the car.
Only with "plrdistwithin=200" could I get the message displayed from all sides and angles.

2. *Flat* objects like the keys, books or the binocular I used seem to have a decal-thin "targetable frame" so its hard to make "pickobject" work when only the flat side can be targeted. When the binoculars where standing upright on a shelf above eye level, it worked, while the flat-lying binocular did not display the message.
BUT: increasing the "plrdistwithin" also brought better results.

Alwyas active did have nothing to do with it but thanks for the hint.

In case you find my grammar and spelling weird ---> native German speaker ^^
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th May 2010 03:07
Well, you have to remember that "plrdistwithin" will only be true if the center of the player is with the distance specified from the center of the entity. Now... this may or may not be "model" center versus "center of mass", but the idea is the same. You must remember that the player has its own width (I believe somewhere in the ballpark of 30 units radius?) and you must tag on the width of the entity, to get a real useable plrdistwithin value. Hence why you needed a higher value to get it working in front of the car, as opposed to the sides. The width of the car from left to right is much lower than from the front of the car to the back.

I was under the impression that you weren't using plrdistwithin. Bad assumption on my part


Hope this helps clear some things up for you.


The one and only,


Login to post a reply

Server time is: 2024-11-24 23:43:35
Your offset time is: 2024-11-24 23:43:35