Jump to content
Sign in to follow this  
NickThissen

Explosion without alerting enemies, or reset alert state

Recommended Posts

Hi,

I have a mission where the main objective is to take out an officer at an enemy base. As a side-objective I want the players to be able to take down a nearby communications tower, which then results in less enemy reactions after taking down the officer (keep the tower alive and I will let the enemy call in backup, take it down and you can get away safely).

The problem is that there is just one communications tower near the base in question, and it is a little too close (about 600 meters). When I use explosions to take it down, the enemies in the base go into alerted state and they don't follow their waypoints properly which will likely ruin the mission how I designed it.

Is there any way to prevent this? I can see three options:

1. Somehow prevent the enemies in the base from being alerted by the explosion (eg temporarily disable their senses right before the explosion and reset it afterwards, I'm just rambling here that's probably not even possible).

2. Reset their state of alertness after the explosion (so they become alerted by the explosion, but a script then resets them back to casual 'safe' state).

3. Take down the tower without making so much noise (I could add an action like "take down silently" to simulate the players sawing the pole down or something like that, but that is not really a good option imo as it will look stupid).

Any suggestions?

Share this post


Link to post
Share on other sites

{_x disableAI "ANIM";} forEach units groupName;
//explosion, followed by 
{_x enableAI "ANIM";} forEach units groupName;
groupName setBehaviour "CARELESS";

???

http://community.bistudio.com/wiki/disableAI

http://community.bistudio.com/wiki/setBehaviour

To destroy a "Land_Communication_F" tower without an explosion:

_nObject = nearestObject [player, "Land_Communication_F"];
_pos = getPosATL _nObject;
_nObject setDamage 1;
_smoke = "#particlesource" createVehicleLocal _pos;
_smoke setParticleClass "MediumSmoke";
_smoke setPosATL _pos;

or use BIS_fnc_sceneSetBehaviour

 ["disableAI",(units groupName),0] call BIS_fnc_sceneSetBehaviour 

Edited by Mattar_Tharkari

Share this post


Link to post
Share on other sites

So I just set their behavior back to careless (or maybe safe) and that makes them forget all about the explosion? I did not expect that to work, but I will try it thanks. I would expect them to jump right back into combat / aware mode because they still remember the explosion but I'm probably wrong.

It seems like I need everyone in one group though, which means they will all line up in formation unless I go by each unit and set them to not go into formation. Or I call the script on each unit separately, both options are not really nice...

Share this post


Link to post
Share on other sites

units groupname just creates an array and is the most common used. You just need an array there - could also be [unit1,unit2.unit3];

or

_array = nearestObjects [[2716,2949,0], ["B_Soldier_base_F"], 100];

to find all the Blufor soldiers 100m from a position. Look in the Splendid Config viewer for more options.

Share this post


Link to post
Share on other sites

I tested a few options including the above and the knowsabout rating still gets triggered so if you release them from careless or BIS_fnc_sceneSetBehaviour they will still take whatever action based on the current knowsabout.

We really need to be able to wipe a units memory for stealth missions.

Only real solution is to use setdamage as it doesn't alert the enemy.

Share this post


Link to post
Share on other sites

Wouldn't that be wonderful the ability to make the AI forget.

I been asking for the opposite of reveal for a couple of years now.

Only time reduces it.

Share this post


Link to post
Share on other sites

What happens if you delete and replace them? Obviously it's a problem if there are a lot but for a few groups just swap them out at the time of the explosion? Or if the player hasn't yet seen them - spawn them after.

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  

×