Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
james mckenzie-smith

Is there any way to make a unit invisible to the player, but not to the AI?

Recommended Posts

As per the thread title, Does anyone know of any way to make a unit invisible to the player, but not to the AI? I know that deleteCollection and hideObject do not do this. Is the best bet to apply transparent textures to a model and use that?

Share this post


Link to post
Share on other sites

The more pressing question here is: For what purpose do you need this? The AI don't rely on their "sight" (they are computer controlled, hence they can't really "see"), but on parameters like the position of ever object and the vectors projected upon these objects originating from the AI - it's all calculation 'n stuff (nevertheless, the unit being hidden could count towards the calculation as another parameter).

What you can do, however, is selectively hide a unit, because hideObject's effect is local.

It's a heck of work but you could locally hide the unit in question by executing the hideObject-command on every players client (!isServer), so the players wouldn't be able to see them, but the AI.

Share this post


Link to post
Share on other sites

I wish to make an aiming point for a GPMG in order to simulate an AI-controlled sustained fire mode, and for a squad/fire team SAW to have something to aim for when laying down some covering or speculative fire, when enemies are not directly determined to have been seen by the AI units in question. I would use createVehicle in order to create the target unit. As it is, doing so and applying deleteCollection and hideObject does not work, as mentioned before; AI gunners can be made to commandTarget no problem, but will not fire using any of the fire commands (except fire, in which the AI unit will fire one round up into the sky).

This is also exclusively for SP, as I just don't make MP scenarios. That's not to say that will not change, but right now SP is my thing. As such, I have no experience using isServer, and I do not know if it would work in SP anyway. Is this an avenue worth exploring? I am guessing not, as SP games are intrinsically a server unto themselves, am I right?

Thanks for your help so far, by the way!

Edited by James McKenzie-Smith

Share this post


Link to post
Share on other sites

There is an invisible unit

grp = createGroup west; pilot = grp createunit ["InvisibleManW_EP1",getpos this,[],0,"none"];

I think AI detect and fire on this unit if my memory is correct but the player does not, It will probably show on the map and I haven't checked thermal view.

I use it mostly in the Static M2 or Search light which makes them appear unmanned.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×