Jump to content
Sign in to follow this  
Solidsnacks

Disabling AI inventory

Recommended Posts

How do you disable player interaction with AI inventories?

I know it sounds counter-intuitive, but I want the players to only use assigned gear.

Share this post


Link to post
Share on other sites

Only give your AI what you want your player to have access to? :)

Share this post


Link to post
Share on other sites

Yep, I don't think you can get rid of default actions like that, and if you can it won't be easy.

Share this post


Link to post
Share on other sites

Yeah, I read into removing the action, but the documentation says you can't remove 'default' actions.

Also, I have opfor spawning via scripts so I can't readily manipulate their gear outside of choosing their class.

Hidebody sounds good so long as I can apply it to said scripted enemies.

Share this post


Link to post
Share on other sites

If you're spawning something you have complete control over their gear.

Share this post


Link to post
Share on other sites

That would work. I just wanted to avoid any unneccesary scripting if I could.

Mainly I wanted to put an emphasis on the players managing their issued gear but maybe something like the loot they did in the EW campaign.

Share this post


Link to post
Share on other sites

@ kylania

Would I be able to define the scripted unit's gear within the spawnGroup parameters or do I need to define within the script what they have access to? If so--a nudge in the right direction would help.

Edited by SolidSnacks
clarity

Share this post


Link to post
Share on other sites

Scripting is necessary and nothing to be afraid of. :) What kind of equipment are you wanting your spawned units to have?

Basically you'd just strip their gear and add back what you wanted to. It's not something the spawnGroup function handles on it's own, but you can easily follow up with it.

Share this post


Link to post
Share on other sites

Totally. I'm not afraid of scripting at all. I just try to make missions with as little overhead as possible.

I just wanted to make it so the players couldn't access the inventories of the OPFOR--the idea being that it's a "training" mission and they're only allowed what they're issued.

How would I go about customizing a script spawned OPFOR loadout because at this point it seems that the best way would be to create a dis-incentive to trade out weapons. I know it sounds sounds lame, but I just don't want someone to trade up for a Zafir or an EBR.

Here's an example of what I have.

RP1 = CreateGroup EAST; RP1 = [getMarkerPos "S1", side COL, ["O_Soldier_F", "O_Soldier_AR_F", "O_Soldier_F"],[],["PRIVATE", "CORPORAL", "SERGEANT"],[],[],[3],1] call BIS_fnc_spawnGroup;

How would I go about customizing these units so they only spawned with MX series weapons and "WEST" Accessories. Heck, even if I could dictate the sunglasses that would be fine.

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  

×