Jump to content
Sloppy Noodl3

Hidden units can be killed by explosions but not bullets?

Recommended Posts

Does anyone know why this is the case? I am using the show/hide module which is very useful in building missions.

The problem I have run into is if an explosion happens close enough to the hidden unit it will be dead when it is revealed after the trigger fires etc.

I have tried the same thing with bullets from rifles,LMGs and HMGs and the unit is perfectly fine once it is shown but not when an explosion is nearby it is dead.

 

  • Like 1

Share this post


Link to post
Share on other sites

That's Arma Engine for an age! You should disable the simulation if you hide a unit. This way the hidden unit will not be hit and will not open fire on enemy, (and shut it up by the way)

  • Like 4

Share this post


Link to post
Share on other sites

Yes to all above. Hidden units will hit triggers, talk, can move, fire, vehicles will still run and emit VFX (some, like exhaust). But not lights because that would actually be useful.
You can use,

_unit setSpeaker "NoVoice";

to shut them up in situations where enableSimulation isn't appropriate.

And allow damage when in the same case.

You can also ship a unit off to objNULL or locationNULL and return with a marker.

_unit setpos (getpos objNULL);
or
_unit setpos (getpos locationNULL);

Ultimately hiding units isn't that useful, objects more so.

  • Like 2

Share this post


Link to post
Share on other sites
22 hours ago, pierremgi said:

That's Arma Engine for an age! You should disable the simulation if you hide a unit. This way the hidden unit will not be hit and will not open fire on enemy, (and shut it up by the way) 

 

I tried this but the AI still dies from explosions. I honestly do not care much about the hidden AI unit talking or reporting enemy positions on the radio at least not in this mission.

I think I found a solution.

I just disable and allow damage like wogz187 said above via triggers. I was going to ask you pierremgi how I disable damage for an entire group etc but I read some of your replies on my past posts and I figured it out : )

 

{ _x allowDamage false; } forEach units unit1;

 

This will set the damage to false in every unit in a group I do not know how to script but thanks to your past posts I was able to write this one line of code lol. Im not sure how this code works entirely but it does. I really need to look more into scripting.

Slowly but surely I suppose it is a lot to take in.

 

  • Like 3

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

×