Jump to content
Sign in to follow this  
CarlGustaffa

Hidebody only available to black ops

Recommended Posts

Hi

I've noticed that the saboteur class automatically gets the "hide body" action added. Is it possible to add this "builtin action" to any type of player, or do I have to attach an EH-killed to all AIs on the battlefield?

Share this post


Link to post
Share on other sites

Add an action to all dead soldiers (http://community.bistudio.com/wiki/addAction, best way via killed EH) and write in the script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_this select 1 action ["HIDEBODY", _this select 0] Done. smile_o.gif

Share this post


Link to post
Share on other sites

Yes, I had already used an attached EH to everyone. But I was sure there had to be a better way of doing it since apparently it's doable on a per type basis. But I guess not, since it appears to be a class defined option.

What I was hoping for was to add "canhidebodies" to players type of soldier in the editor, instead of attaching en EH-killed event to every soldier on the map.

But one thing always leads to another it seems.

How can I restrict what units an addaction or eventhandler is being added to, based on its class? Since I now get Hidebody on vehicles I take out.

Share this post


Link to post
Share on other sites

You could also add a trigger which is setpos'ed to the players position and only add the action to the player when there's a dead unit in the trigger.

You can check through the triggers list with isKindOf or you can check in the config if the unit type has the correct side (with getNumber(configFile>>"CfgVehicles">>myType>>"side")

).

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  

×