Jump to content

Recommended Posts

Player view changes when player is changing body

Wouldn't that be PlayerBodyChanged EH then?

Bohemia really nailed it with their naming conventions this time...

 

And there I thought we could get an eventhandler that triggers when changing the CAMERA VIEW from gunner to third person/first person etc.

 

A man can only dream.

 

Cheers

Share this post


Link to post
Share on other sites

Wouldn't that be PlayerBodyChanged EH then?

Bohemia really nailed it with their naming conventions this time...

 

And there I thought we could get an eventhandler that triggers when changing the CAMERA VIEW from gunner to third person/first person etc.

 

A man can only dream.

 

Cheers

No it is about view change so the name is correct. Body change leads to player view (what player sees) change

Share this post


Link to post
Share on other sites

So when does the event handler come that fires when the player changes the actual view and how will it be named? (GUNNER -> INTERNAL -> EXTERNAL etc.)

Share this post


Link to post
Share on other sites

So when does the event handler come that fires when the player changes the actual view and how will it be named? (GUNNER -> INTERNAL -> EXTERNAL etc.)

CameraSwitched perhaps

  • Like 1

Share this post


Link to post
Share on other sites

CameraSwitched perhaps

You mean PlayerCameraSwitched? Thus, we get to know the entity this is being triggered on.

Share this post


Link to post
Share on other sites

The load(Abs) commands seem to be broken. They count loaded magazines twice. Extreme example:

// getUnitLoadout player
// loadAbs player

// no PCML missile
[[],["launch_NLAW_F","","","",[],[],""],[],[],[],["B_AssaultPack_rgr_LAT",[]],"","",[],["","","","","",""]]
120

// 1 PCML missile in backpack
[[],["launch_NLAW_F","","","",[],[],""],[],[],[],["B_AssaultPack_rgr_LAT",[["NLAW_F",1,1]]],"","",[],["","","","","",""]]
200

// 1 loaded PCML missile
[[],["launch_NLAW_F","","","",["NLAW_F",1],[],""],[],[],[],["B_AssaultPack_rgr_LAT",[]],"","",[],["","","","","",""]]
280
  • Like 3

Share this post


Link to post
Share on other sites

Can we have a "removeMagazines" for Containers? or like I mentioned earlier get/setContainerLoadout (Container variant of get/setUnitLoadout)

With the bug that Weaponholders are deleted as soon they have no inventory, even if added afterwards, its just really annonying and needs a hugh workaround

(read all inventory then manipulate the read data, then remove the old inventory stepwise to not get the WH deleted and add everything back)

Share this post


Link to post
Share on other sites

Seems like such a simple thing is still to complicated. If only Arma were open source this could've been fixed years ago and without much effort to be honest.

  • Like 2

Share this post


Link to post
Share on other sites

Well they have got time for so many things, but the most basic seems to be too "lame"
which is understandable... kind of

however, either the weaponholder cleanup needs to get fixed or one of the said commands needs to be implemented

I would prefer both, but the commands over the bugfix tbh

Share this post


Link to post
Share on other sites

Are we allowed to delete blatantly false comments on the scripting wiki?

 

E.g. this comment from disat:

https://community.bistudio.com/wiki/getPos

 

>This command returns a PositionAGL. Apparently, Position and PositionAGL are the same thing.

 

getPos reports AGLS, not AGL. He left the same comment on setPos and there exists this misconception that setPos and getPos actually use the same reference system for the z-axis, which they don't. A clean wiki could avoid such misconceptions.

 

 

Share this post


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

Are we allowed to delete blatantly false comments on the scripting wiki?

 

E.g. this comment from disat:

https://community.bistudio.com/wiki/getPos

 

>This command returns a PositionAGL. Apparently, Position and PositionAGL are the same thing.

 

getPos reports AGLS, not AGL. He left the same comment on setPos and there exists this misconception that setPos and getPos actually use the same reference system for the z-axis, which they don't. A clean wiki could avoid such misconceptions.

 

 

 

Of course you can remove or edit incorrect or misleading information on the wiki. The game evolves and what once being true might not be any more. If not sure, you can always start Talk on the subject in question on wiki instead of posting this here.

As it stands I removed that old comment.

  • Like 2

Share this post


Link to post
Share on other sites

Hi guys!

I'm currently reviewing event handlers, trying to make a list of those that persist after a respawn, and found a somewhat strange behaviour.

 

The "AnimDone" EH is persistent and will apply to a respawned player, but it will also keep firing constantly on previous corpses. Is that intended behaviour? I can't see any reason to keep an EH active on a dead entity.

  • Like 1

Share this post


Link to post
Share on other sites

They all persist after respawn in Arma 3 and they stay on the corpse too, although "Respawn" and "Killed" obviously won't be triggered again.

  • Like 2

Share this post


Link to post
Share on other sites

Oh boy, you spared me a lot of time. I guess the wiki descriptions could use an update on this.

Share this post


Link to post
Share on other sites

The last few updates seem to have broken the transport unload waypoint, using a trigger to eject everyone in your team, I have a helo cast mission by Myncok, that works perfect on stable build, he created a simple helo cast just now for me, that worked perfect for him on stable, but it will not work for me, on Vanilla no mods, 32 or 64 bit on dev build.

Even the Parascript from Beerkan using "eject" doesn't work any longer on dev build, has anyone else face similar issues?

Share this post


Link to post
Share on other sites

is it intended behaviour that the "loaded" mission EH is not firing after the game is fully restarted and you resume a mission from the last save?

 

might be me fuckign up debug again but everything i see points to it not firing there.

 

i'd either like an explaination why this is intended behaviour or confirmation that it is not so a proper bug report can be made.

Share this post


Link to post
Share on other sites

How to make lineIntersectsSurfaces report more than one result? I can't get it to return more than one

 

 

_pos0 = getPosASL player vectorAdd [0,0,-100];

_pos1 = _pos0 vectorAdd [0, 0, 1000];

lineIntersectsSurfaces [_pos0, _pos1, objNull, objNull, true, 10];

 

It's always just one result. Either the ground or once for the multi story building I'm inside (when I replace -100 with 0).

Replacing the 10 with -1 like the wiki says results in an empty array.

-2 and other negative numbers makes it report one intersection again, but not all. I guess that's just unexpected behavior.

Share this post


Link to post
Share on other sites
6 hours ago, commy2 said:

How to make lineIntersectsSurfaces report more than one result? I can't get it to return more than one

 

 

_pos0 = getPosASL player vectorAdd [0,0,-100];

_pos1 = _pos0 vectorAdd [0, 0, 1000];

lineIntersectsSurfaces [_pos0, _pos1, objNull, objNull, true, 10];

 

It's always just one result. Either the ground or once for the multi story building I'm inside (when I replace -100 with 0).

Replacing the 10 with -1 like the wiki says results in an empty array.

-2 and other negative numbers makes it report one intersection again, but not all. I guess that's just unexpected behavior.


No Intersect commands work under ground, so the fact that you have ground intersection and not [] is something added extra to the command when you have no intersections at all. So either start your intersection above ground and up or do from top down.

As for -1 not returning all entries, thanks for reporting it. Amazing how long it took ;). This will be fixed, it should accept -1 or <0 as a matter of fact as unlimited return.

  • Like 1

Share this post


Link to post
Share on other sites

I figured it out that it doesn't work if the line starts underground. Always check from top to bottom to get results I guess.

The command also seems to only report the first intersection of any object. I wanted to use to to figure out how many floors a multi story building has. Sadly the command doesn't seem to support the RoadWay LOD either.

 

In the mean time anyone can just use 1E6 or some huge number like that to get all results.

Share this post


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

I wanted to use to to figure out how many floors a multi story building has

 

You can always count building positions:
 

_floors = []; 
{
  _floors pushBackUnique round (_x select 2);
} 
forEach (cursorObject buildingPos -1); 
hint str count _floors;

returns 6 for offices

  • Like 2

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

×