Jump to content
Sign in to follow this  

Recommended Posts

OK, working with a mission to put Navy Seals coming out of the sea as an insertion unit. Problem is, after a while they tend to lose any weapons while swimming. Any way to avoid this?

Thanks!

Share this post


Link to post
Share on other sites

Without going into too complicated solutions, how about you just remove their weapons at start (if they start swimming) and then make a trigger on the shore which adds weapons to them?

Share this post


Link to post
Share on other sites

Another way that requires a couple of tests...

I'm always giving complicated ideas, i know...

Just try to be an observer of this kind of experiments with AI.

Put yourself in the beach / coast with binoculars.

Put only one AI with weapons in a boat or directly swimming if you want it.

Just make a little 'math' code to know the distance from that soldier to a certain invisible area (area with coordinates, or maybe just and Heli_H_empty as the target that Ai has to reach). That area will be a reference point in the distance.

Now check constantly (loop with delay) when the soldier has not certain weapons (mostly the weapons that kind of soldier will carry)

Show in the 'Hint space' the distance to that area or reference point in the coast + the Z coordinate (altitude) of the AI.

Make a text to be added to the Hint only when the soldier loses all his weapons (or at least when the soldier lose at least one, or maybe check his magazines).

That text can be this kind: "I'm blind, just lost my weapons"

So you will know what distance from your "area to be inserted Ai's" and which altitude from sea level was the AI when lose his weapons.

Write in Notepad or paper that numbers.

Now try the same method but with 2 x AI.

If the numbers coming more or less the same... you will find a new 'truth' of ArmA.

Maybe you have not to declare that area first, maybe you have to check the distance from the nearest surface "beach sand", "coast" or something like this.

Or maybe all you need is to count how many time is passing from player inside water till he loses weapon/weapons/magazine/magazines.

I think this tedious experiment will give you interestings values to help you to know when to add weapons, to make the insertion more reallistic.

Then you will have also to 'remove' automatically, the weapons/magazines inside the water, to make it a little bit more reallistic.

Well, then, why you with the binoculars?

As said you at the start of this post, you will need to 'watch' all the experiment to learn the details that is causing that lost of weapons.

Maybe when AI (also human players) is losing his 'religion' they are doing a little animation, so if this last is true, you can check which animation is started and the state of that animation, so you can script in an automatic way, how to add weapons, and WHEN.

Just experiment this idea if you want, a lot of people in this forums can help you with very good insertions in beach/coasts and preventing certain issues like the lose of weapons on water.

Try another experiment, this one is so easy:

Just put yourself in the beach, walking so slowly into water, as if you are blind and trying to go to the other side of the ocean. So slowly. Make stops sometimes.

Put in Hint the Z of your coordinates.

Just watch the Hint till you lose weapons. Put yourself in 3rd person view (external view?) in all the whole experiment.

In this experiments, always the Z will be variable even you stopped, because the tides...

Ah, never go to the water with the body-to-ground position, it will:

1st. Hurt you when your Z coordinate is between some margins. Mostly of that values, the water over your head, simulating the real life.

2nd. Kill you by cumulative damage.

3rd. Not always in this issue, when you dying, you can respawn. You will notice that you are seeing a new ArmA bug, when you are died, and you not seeing the 'scores' table. If you try to respawn via ArmA-menu "Respawn", it will do nothing. Just have to quit the mission and start it again. This issue i tested it a lot in 1.02 version. I will test it in 1.05 soon.

In fact, there is a value of damage that, if you having it, it will cause to appear this bug. I think i have it in a script in some place of the harddisk... i will search for it if you interested in this 'issue'.

Share this post


Link to post
Share on other sites

As Shuko said, try this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Soldier=_This Select 0;

_Weapons=Weapons _Soldier;

_Ammo=Magazines _Soldier;

If (surfaceIsWater (GetPos _Soldier)) Then

     {

     RemoveAllWeapons _Soldier;

     RemoveMagazines _Soldier;

     WaitUntil {!SurfaceIsWater (GetPos _Soldier)};

     {_Soldier addMagazine _x} ForEach _Ammo;

     {_Soldier addWeapon _x} ForEach _Weapons;

     };

Not tested in the editor so there may be some errors, you may have to add one extra magazine to make up for adding a new weapon.

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  

×