Jump to content
Sign in to follow this  
snkman

selectionPosition? Bug?

Recommended Posts

Hey guy's,

after some test's with the "selectionPosition" command it look's like it do not work... It alway's return's [0,0,0].

Can anyone confirm this?

Share this post


Link to post
Share on other sites

Hmm... Strange... So there must be something wrong on my side.

Thanks for the replay Dawg. ;)

Edit:

It works with vehicles but soldiers do only return [0,0,0]... Too bad...

Edited by SNKMAN

Share this post


Link to post
Share on other sites

Biki syntax:

Array = object selectionPosition selectionName

Biki example:

_object = player selectionposition "head_hit"

Ehh, what, _object? When hinted I get a [0,0,0] position, not an object, or "heat_hit" doesn't exist for player. Did something change, or is it just a weird example?

Share this post


Link to post
Share on other sites

'head_hit' is not in the Memory LoD it's in the HitPoints LoD so obviously your selectionPosition returns [0,0,0].

If you'd like to know the available Memory LoD points for any given model then just ask.

Edited by Synide

Share this post


Link to post
Share on other sites

Well i have tryed it with a "E.H. Dammaged" which will return every selection name in (_this select 1).

Example E.H. Dammaged:

_unit = _this select 0;
_selection = _this select 1;

_selectionPosition = _unit selectionposition _selection;

hint str _selectionPosition;

The variable "_selectionPosition" should now return the position of where the unit was hit but it only returns [0,0,0].

Share this post


Link to post
Share on other sites

The event handler for damage uses the Hit Points LoD from memory. The selectPosition scripting command uses the Memory Points LoD. While there are many similarly defined named selections/component names between the 2 LoDs there are significantly dissimilar ones as well.

As I said before. 'head_hit' is not in the Memory LoD so selectionPosition returns [0,0,0].

The method discribed in the Biki for deducing named selections to use with selectPosition is flawed. But, will suffice 'most' of the time.

You can only use named selections from the Memory LoD with this command in A1/A2/OA. In VBS2 the command searches the Memory LoD first then the Geometry LoD, then the Fire Geometery LoD. But, this isn't VBS2 is it.

If you specify which model you are trying to use selectPosition with a list of available named selections could be provided.

Edited by Synide

Share this post


Link to post
Share on other sites

Instead here's ( 9 Kb link NOT 24/7) a little program that will create a report of named selections for the Memory LoD only from odol's so you can use the 'selectionPosition' scripting command a little more effectively. Output is to a text file of the comma seperated value variety.

Read the readme.txt to get the gist. Let me know if there's a problem with it.

Cheers, Sy.

Edited by Synide

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×