UNN 0 Posted January 5, 2006 Hi, The best way to introduce this problem is with a quick example: Add the player to any map, as the driver of a Jeep or UAZ. Add an infantry guy as a group member and set him to "In Cargo". Name the infantry guy AAA (or something) so you can refer to him in a script. Add a Radio Trigger, with the following code in the "On Activation" field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">AAA SwitchCamera "INTERNAL" Now if you drive off in the jeep, with your infantry guy in as cargo. Keep going until you get bored, then jump out and activate the Radio trigger. I would not be surprised if you expected to look though the eyes of the guy sat in the back of your jeep. But what you find is the view from the position where the AI actually climbed into the jeep, and not it's current position. It's as though the AI's conciousnous, is left in its original position when it boards a vehicle. What you see in the vehicle is just a pointer to the original. As soon as you disembark the AI, everything returns to normal. All this seems reasonable, given they are called proxies. But if any of you have ever played a CTI and wondered why you could here the screams of invisible AI, when stood next to a vehicle factory. That’s why, And to finally get to the problem I have. The same thing happens with userActions, the user action is left in the AI's original position and still available for activation. So to me, this along with the screams, adds up to a bug? I just wondered if anyone has come across this before, and is there a way to fix it? Am I missing something from my p3d? And out of curiosity, does the same thing happen with OFP Elite and Armed Assault. There is a work around, but it means writing a custom useraction addon. Which would add some new features, but also comes with all the baggage you get. When adding complex scripts to a mission, just to accomplish simple tasks. Cheers Share this post Link to post Share on other sites
sanctuary 19 Posted January 6, 2006 I had such kind of problem during a cutscene. I wanted to attach a camera to an unit that was walking then climbing into a chopper, only to understand after losing some hairs in the process , that once an unit is inside a vehicle , he will "cease to exist" when it comes to coordinates, and always the last position just before being in the vehicle is reported. The only solution i found was to attach the camera to the chopper and target the chopper to get a view of the inside. But, despite being frustrating sometime, there is an interest to this method of AI "ceasing to exist" physically when boarding a vehicle: the performance is improving a lot, as i noticed that putting 4 full squads into 4 trucks that are moving on the same road is offering a better performance than having those 4 full AI squads running on this same road. Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 6, 2006 (UNN @ Jan. 06 2006,06:42) said: But if any of you have ever played a CTI and wondered why you could here the screams of invisible AI, when stood next to a vehicle factory. That’s why, Aaaarrrhhhharrrrrrrr ! So thats why ....... makes sense UNN Which makes me curious, does that mean CARGO AI don't see anything when parked in the middle of a battlefield ...... I must check Would seem rather contradictive if they did, like BIS did a half solution to this problem. Which also reminds me, to check to see what you can see through the eyes of a crCTI cargo AI, whether u get the same result. (might be different scripting anyway) Share this post Link to post Share on other sites
UNN 0 Posted January 6, 2006 [b said: Quote[/b] ]But, despite being frustrating sometime, there is an interest to this method of AI "ceasing to exist" physically when boarding a vehicle: the performance is improving a lot, as i noticed that putting 4 full squads into 4 trucks that are moving on the same road is offering a better performance than having those 4 full AI squads running on this same road. Yeah, it's not a bad way of storing infantry for use later in a mission. [b said: Quote[/b] ]does that mean CARGO AI don't see anything when parked in the middle of a battlefield Good point, perhaps they would act like a remote camera? You have the same problem with HE explosions. Only normaly, you don't notice it. [b said: Quote[/b] ]Which also reminds me, to check to see what you can see through the eyes of a crCTI cargo AI, whether u get the same result. (might be different scripting anyway) You can get round the sound problem by creating the crew at [0,0,0] and moving them in. If you do take a look, let us know how he moves the crew into a vehicle. Is it MoveInDriver e.t.c or Action ["Getin",_Vehicle]? Cheers Share this post Link to post Share on other sites
ag_smith 0 Posted January 6, 2006 Let me add up, incase you didn't notice this one as well. Everytime a unit, should it be player or AI disembarks the vehicle, it's, let's say, createvehicle'd again, meaning init eventhandler is executed again. This would rank among the most illogical OFP "features" ever. Share this post Link to post Share on other sites
sanctuary 19 Posted January 6, 2006 (UNN @ Jan. 06 2006,01:53) said: [b said: Quote[/b] ]But, despite being frustrating sometime, there is an interest to this method of AI "ceasing to exist" physically when boarding a vehicle: the performance is improving a lot, as i noticed that putting 4 full squads into 4 trucks that are moving on the same road is offering a better performance than having those 4 full AI squads running on this same road. Yeah, it's not a bad way of storing infantry for use later in a mission. Exactly, That's a trick i used in the demo mission of the DMA euro resistance from Williec, it allowed me to have lots of units to fight without any kind of performance hit and without having to create/delete them regularly. Share this post Link to post Share on other sites
@cero 0 Posted January 6, 2006 (Sanctuary @ Jan. 06 2006,01:20) said: ... as i noticed that putting 4 full squads into 4 trucks that are moving on the same road is offering a better performance than having those 4 full AI squads running on this same road. I thought it would be to do with all the animation and calculations made in the engine when the full squad is on foot being much more complex than the ones created by a single vehicle. I´m not being sarcasic or anything, I find it interesting, it makes me think about using vehicles more now than foot patrols due to possible performance issues in some missions. [APS]Gnat got a point too by asking that question he asked, something that would explain a lot about AI behaviour when in cargo only vehicles. If things are like that, you´ll only be detected by the driver of a vehicle without a comnder and a guner, because any cargo is not really there, so they can´t really detect you,  do I get that right? Regards. @CERO EDIT: Lol, a lot of fast posting going on here Thanks for the little tric Sanctuary, that will surelly hellp me Share this post Link to post Share on other sites
UNN 0 Posted January 6, 2006 I checked the AI's knowsabout around the last position it boards the vehicle. Nothing, so atm it's just the XYZ position, user actions and sound that appear to exist after a get in. BTW Thanks for confirming the sound thing...I was begining to wonder if I was hearing things Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 6, 2006 Well I'll be buggered !!!!!!!!!! The Cargo ARE blind Looks like drivers, gunners and commanders are the only who "see" out of the vehicles. Sad Although, its only taken me 3 years and UNNs post to notice !! LOL I did a simple "Detected by East" trigger around some Cargo only trucks and sure enough, nothing I did (until I effected the trucks) caused them to "see" me. Even then, they did not see me until they we OUT of the trucks. On the de-lagging issue, I can see a very handy addon being made a simple invisible "bunker" with 100 cargo spots in it ...... very handy where you dont want to use createunit or createvehicle. Share this post Link to post Share on other sites
General Barron 0 Posted January 6, 2006 Yeah, this is also a problem with scripting commands referring to the unit in the vehicle--they all give you info about the unit BEFORE he got in the vehicle. Getpos would give the position where he got in, for example... speed returns his speed as he got in... etc etc. Rather annoying, but the easy way around it is to (almost) always use "vehicle unit" whenever referring to a unit. For example: getpos (vehicle someBloke) --instead of just-- getpos someBloke I never noticed the sound or useractions problems, but they don't surprise me either; similar problems exist with scripted actions as well, IIRC. *Hopefully* this is all fixed in Game2/ArmA. In the meantime, I don't know of any 'pretty' fix to this. A script that might be of interest to you: http://www.ofpec.com/yabbse....d=25251 Share this post Link to post Share on other sites
UNN 0 Posted January 6, 2006 [b said: Quote[/b] ]Looks like drivers, gunners and commanders are the only who "see" out of the vehicles. Looking through the config, they only have options for what Drivers,Gunners and Commanders can see. Perhaps configuring all the cargo as co-drivers will make a difference. Although I'm sure that would have other side effects? Thanks for the link GB, I just wish you had the same option for AddUserAction that you have with config useractions. It looks like I will have to create my own generic user action addon. It's a similar idea to Blanco's script, but it will allow you to add user actions in a mission, that have conditions you can configure in real time. Only, it's yet another addon to download and more constant looping scripts. But In the long run, it should reduce the overall number of addons required for what I want to do. Share this post Link to post Share on other sites