Jump to content

Recommended Posts

1 hour ago, das attorney said:

TerrainIntersectASL seems broken.

 

Put a boat called p1 in deep water then put this in the debug console:

 


hint str (terrainIntersectASL[getPosASL p1,AGLtoASL (p1 modelToWorld [0,0,-4])])

 

returns true

 

(going by what's on the wiki that modelToWorld returns translated world position, format PositionAGL)

 

edit:  I used "B_G_Boat_Transport_01_F"

 

 



I think the only command that works under water is lineIntersectsSurfaces

Share this post


Link to post
Share on other sites

Thanks for the reply (and linking the notes - I gave them a read through).

 

Just to clarify, the boat (p1) is floating on the surface of the water, and if I try this:

 

onEachFrame {
    hintSilent str (terrainIntersectASL[AGLtoASL (p1 modelToWorld [0,0,10]),AGLtoASL (p1 modelToWorld [0,0,-4])])
};

 

It returns true all the time.

 

I checked what the start pos was and teleported my player there with:

 

player setPosASL AGLtoASL (p1 modelToWorld [0,0,10])

 

And |I was floating in mid-air above the boat.

 

If I try it with:

 

onEachFrame {
    hintSilent str (lineIntersectsSurfaces [
        AGLtoASL (p1 modelToWorld [5,0,10]), 
        AGLtoASL (p1 modelToWorld [5,0,-4]), 
        p1
    ])
}

 

Then it acts as expected and returns no intersection (empty array).

 

Sorry, I'm probably not be getting it, but still confused from the results (unless terrainIntersectASL thinks intersection with water is a terrain intersect).

Share this post


Link to post
Share on other sites
3 minutes ago, das attorney said:

unless terrainIntersectASL thinks intersection with water is a terrain intersect


I think this is what happening

Share this post


Link to post
Share on other sites
11 minutes ago, das attorney said:

Or is that intended


I cannot answer that, but I think this was like this for the last 15 years 

Share this post


Link to post
Share on other sites

All intersect commands before lineIntersectsSurfaces fail under water.

Share this post


Link to post
Share on other sites
2 hours ago, fn_Quiksilver said:

actionParams needs to return empty array [] instead of nil, when bad input number is given (example: player actionParams 456 )

 

This is a tricky one. I think returning nil was design decision, because the command returns array of a certain format. In cases like this, normally, when it is not possible to obtain the result, a command should return array of the same format but filled with default values (or like [0,0,0] as exception for all positions and vectors). Unfortunatelly returning default values for action params may look like there is an action attached and may produce misleading results. Returning empty array would make sense for collections, but not pre-formatted outputs. If one would not check for existence of a partcular element he tries to access, in case of empty array, this will result in error. So might as well check for the existence of the whole result, because then it will be guaranteed that all array elements are present. I think it is better to mention this on BIKI and be done with it. SQF is not exactly the most consistent scripting language in the world, you know ;)

  • Like 2

Share this post


Link to post
Share on other sites

Not even newly added commands are consistent. It just gets worse every patch.

Thankfully we have param(s).

[_object actionParams _id] param [0, []]

Share this post


Link to post
Share on other sites
35 minutes ago, commy2 said:

Not even newly added commands are consistent. It just gets worse every patch.

Thankfully we have param(s).


[_object actionParams _id] param [0, []]

So you have empty array, now what?

Share this post


Link to post
Share on other sites

You win.

[_object actionParams _id] param [0, []] params ["_script", "_arguments", ...];

 

Share this post


Link to post
Share on other sites
1 minute ago, commy2 said:

You win.


[_object actionParams _id] param [0, []] params ["_script", "_arguments", ...];

 

Still, you need some kind of default value for each param. So why not at least check if the action id exists and abort if there is no such action, rather than forcing execution no matter what?

Share this post


Link to post
Share on other sites

Depends on what you're doing with your script. I'm sure Quiksilver has a good reason why he wants it to be an empty array.

This technique is used in ACE3 everywhere.

 

private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
getAllHitPointsDamage _vehicle param [0, []]
fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []]
(assignedVehicleRole ACE_player) param [1, []]

etc. etc.

Share this post


Link to post
Share on other sites

Requesting an alternative syntax for the createVehicleCrew function

 

_group = createVehicleCrew [<vehicle:object>,<deletegroupwhenempty:bool>];

would return group, and allow us to set bool for deleteGroupWhenEmpty

 

At the moment we have to do this sort of thing:

 

createVehicleCrew _mortar;
_group = group (effectiveCommander _mortar);
_group deleteGroupWhenEmpty TRUE;

 

  • Like 1

Share this post


Link to post
Share on other sites

Always found it odd that createVehicleCrew didn't return anything.

At least the group or array of units created, suggestion above is fine.

 

Cheers

  • Like 3

Share this post


Link to post
Share on other sites

It seems like the menu control type (46) added with eden is broken. Seemingly as soon as the display focus is not on the menu the control will be deleted. This would make some sense for a context menu (type 14), but seems unintentional for a plain old menu. Strip menus (type 47) behave as expected.

 

It's entirely possible I'm overlooking something though as there's no documentation on these types and I've just been playing with configs to try and get them working.

Share this post


Link to post
Share on other sites
Quote

Added: New error message for unknown enumerated values in all script commands using enum values (example: _g2 setBehaviour "CARELES" will cause an error, because the correct value is "CARELESS")

This doesn't seem to like custom Eden mission Attributes (Cfg3DEN -> class Mission -> class custommissionattribute), spews out error : Error Foreign error: Unknown enum value: "custommissionattribute" when trying to set value to one with set3DENMissionAttribue or set3DENMissionAttributes..

Share this post


Link to post
Share on other sites

Getting bogus error Foreign error: Unknown enum value: "camouflageCoef" when doing set or getUnitTrait.

Testing in debug console the command works correctly but there is that error spam.

 

run in debug console:

player setUnitTrait ["camouflageCoef", 0.123];

and watch:

player getUnitTrait "camouflageCoef"

 

Share this post


Link to post
Share on other sites

Is it possible for us to get a scripting command that allows us to disable the auto-wakeup part of being ragdolled and another for triggering a ragdoll on a unit (without having to spawn a physics object to trigger the collision ragdoll) as it would be ideal for a medical script to be able to have little to no visual difference between a player who is unconscious and one that is dead.

Share this post


Link to post
Share on other sites

Or just give a setter and getter to force the ragdoll... But that has been requested since Alpha...

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Small suggestion : a createSimpleObjectLocal command would be nice to have.

Or maybe add an optional parameter to createSimpleObject if one wants it to behave like createVehicleLocal.

  • Like 2

Share this post


Link to post
Share on other sites

What happened to 

_unit disableAI "THREAT_PATH";
_unit disableAI "PATHPLAN";

These are not recognized on DEV branch and produce script errors.

 

While on the subject of disableAI, I can not resist to just randomly plug a little request: Something like:

_unit disableAI "GETOUT"/"DISMOUNT" or similar... 
OR:
_unit allowGetOut false;

would make me smile.

 

 

 

Share this post


Link to post
Share on other sites
58 minutes ago, mad_cheese said:

What happened to 


_unit disableAI "THREAT_PATH";
_unit disableAI "PATHPLAN";

These are not recognized on DEV branch and produce script errors.

 

While on the subject of disableAI, I can not resist to just randomly plug a little request: Something like:


_unit disableAI "GETOUT"/"DISMOUNT" or similar... 
OR:
_unit allowGetOut false;

would make me smile.

 

 

 

 

were threat_path and pathplan ever actually working?

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

×