Hi all, ok I read the new posts just now after making some changes. Ok for the steal obj code Tom posted it will not always work. I tried several combinations. The main problem is the 2 conditionals
if_obj_home_false
if_obj_captured
You need combinations of the 2 but is not reliable. I wish there was a keyword like if_obj_not_captured. But there isn't. So basically the code Tom posted cannot reactivate the action when a flag is stolen but not captured. In this scenario the opponent may also steal a flag and mess the goal number of the previous team.
So to get around it I had to rearrange the .script file such that the func_explosive is called (via the alertentity) after a new construct which triggers the events. Here is the code from the .aiscript, I tested multiple times and works with the goal tracker being maintained always for both teams at the same time no matter of the combination (steals/returns and so forth):
Code:
// Flags alert to rectify the goal tracker
action 73
{
activateAction 1 // Allies first steal action activate it always
activateAction 11 // Axis first steal action activate it always
// First Pass activate all actions where the flag is taken (regardless if it's captured or not)
if_obj_home_false 7
activateAction 7
if_obj_home_false 6
activateAction 6
if_obj_home_false 5
activateAction 5
if_obj_home_false 4
activateAction 4
if_obj_home_false 3
activateAction 3
if_obj_home_false 2
activateAction 2
// Second pass deactivate the ones already captured
if_obj_captured 1
deactivateAction 1
if_obj_captured 2
deactivateAction 2
if_obj_captured 3
deactivateAction 3
if_obj_captured 4
deactivateAction 4
if_obj_captured 5
deactivateAction 5
if_obj_captured 6
deactivateAction 6
//Repeat for Axis
if_obj_home_false 17
activateAction 17
if_obj_home_false 16
activateAction 16
if_obj_home_false 15
activateAction 15
if_obj_home_false 14
activateAction 14
if_obj_home_false 13
activateAction 13
if_obj_home_false 12
activateAction 12
if_obj_captured 11
deactivateAction 11
if_obj_captured 12
deactivateAction 12
if_obj_captured 13
deactivateAction 13
if_obj_captured 14
deactivateAction 14
if_obj_captured 15
deactivateAction 15
if_obj_captured 16
deactivateAction 16
}
Several of my attempts are in comments within the .aiscript file. I added a new TOI that points to a construct and is called when either team steals, returns or captures a flag. Ok now there 2 passes through all flag actions to ensure no matter which flag is stolen or returned their equivalent actions are re-activated and any others disabled.
The first pass activates the actions based on whether a flag is stolen but not captured. In order to determine if it is captured the 2nd pass deactivates the actions. This method is used in conjunction with the func_explosive that is loaded at the end of a capture operation to disable the previous and enable the new action for the specific team (the one who did the capture). The rest is taken care from the code above. This way you could save keywords significantly from the .aiscript.
I updated the code under the original link with this. I have the old code too.
New code with steal events
http://www.asymmetrics.com/tmp/fritzbot_darji2.zip
Original code with roam actions
http://www.asymmetrics.com/tmp/fritzbot_darji2_v1.zip
I also updated the alt roams, not sure why by the bots would rarely follow them originally. I set them up with goal 0, group 0 and always active and got rid of the 69. These are the good news. The bad news is that I am getting a G_Spawn error that ET could not create entities. I see it when I deploy 32 bots and it is not due to heavy fighting during gameplay but it's intemittent. Something else is going on and started, I suspect, since I added the 5th TOI for the construct to invoke the code above.
Few other comments. I tried the delivery disable/enable, Tom mentioned earlier on but the bots do not behave well. The one that has the flag may go to camp say position but will not respond to enemy fire. Also bots that target the steal operations do not respond, sometimes they would pass each other (and I am talking groups of them) without a single shot fired. This is not the case with the original code.
Thanks
CK-Chaos
Tom, I just read the comments in purple above yes I removed the minehunt operations. I may simply change the steal back to roam actions just to see how the bots will behave.