Jump to content
Official BF Editor Forums
SERPIKO

Is it possible to make Python changes a PCO "dontAllowExit" value based on hitpoints?

Recommended Posts

Hi Community,
I restarted working to my "singleplayer" mod which already features the following:

1) control points can only be captured by infantry (vehicles always stop to a certain distance from them, outside CP area);

2) when approaching the attacked CP, all bots in vehicles  (except bots in "gunner" PCO) get down  and head towards the CP infantry order position;

3) bots in "gunner" PCO keep their position to "watch the area" and provide cover fire; this really gives more realism and you don't see anymore abandoned jeeps or apc around the map.

To get this last point the only successful way seems editing the vehicle tweak and adding "dontAllowExit 1" to the gunner PCO.
Any different methods (tried with gunner PCO "temperature", weapons.ai  "strenghts", aibehaviours, etc..) did not work, as bots will always get down the vehicle whatever values you can set.
The only problem is that when the vehicle reaches its criticalDamage, the "dontAllowExit 1" command  condemns the gunner bot to keep into vehicle until it dies.
Is it possible to make Python changes the command "dontAllowExit 1" to "dontAllowExit 0" whenever a vehicle reached its criticalDamage or when its hitpoints go down a certain value (let's say 200)?
I checked different MODS python scripts but could not find anything to slightly customize to my end.
Any help would be appreciated and I am willing to pay if anyone can provide the complete solution.
Cheers
Serpiko

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...