Rommel 2 Posted September 11, 2010 I've noticed a lot of people do complex IED scripts, when really, the simplest and best (from my own experience) is having actual AI detonate a satchel charge on the road. It has the best 'average' stopping power, not always killing, but not under powerful either. It can be stopped by killing the suspect who planted it; without any scripting. It has to be planted during game play. Giving two elements to an objective. Attached a mission on how this can be done. ;) http://dev-heaven.net/attachments/download/7928/ied_example.Takistan.7z Share this post Link to post Share on other sites
00dc15 0 Posted September 11, 2010 @ Rommel, Yes I have to agree this is the best approach if you don't want a very random element. In my case I play singleplayer only & write my own missions, so for me it must be random. Now in the current mission I'm making I want to have a briefing at a base then move to a Town & patrol it. I want the possibility of there to be an IED somewhere on my patrol route, but there must be 3 things for me: 1) The placement must be both random but also in a good place. In my script (currently still being written) this is achieved by setting the bomber waypoints around the town & then having him deploy the IED at a random time. 2) The bomber must then hide in a random place (preferably in a building) but where he can see the IED from. 3) The IED must not go off till the bomber knows about BLUFOR near it & there must also be a chance of a failed detonation (so you can request an engineer to deactivate it). Now all the above is possible in the mission editor without external scripts but must be pre planned, for example you select a site for an IED & place it, then you find a (or all) locations you can see it from, next you can program the AI to place it there & run to one of the locations you've selected. Now on playing that mission I know where it will be & where he is likely to be (even if I gave him 5 random places to hide), Yes I could setup 15 of these guy's round the town with a random chance of 1 of them being present in the mission, but it would take ages to do & also would have to be done all over again for another town or location (also it would be near on impossible (I think) to make it work with a random town, generated by the town module). What my script does is make it possible to have a placed AI do all the above randomly without any fuss by the mission maker, but would only really be required by people playing there own missions, If I gave you one of my missions it wouldn't be relevent because you wouldn't know where I've placed the IED or hidden the detonation man, I hope this explains why in certain cases a complicated approach is required. Regards James Share this post Link to post Share on other sites
Rommel 2 Posted September 11, 2010 (edited) Hehe, I don't question what people who have specific situations or requirements want. But I'd say 99% of the mission makers who don't have those requirements, would prefer something simpler. Such as this example. ;) I'm not vindicating those who use more complex solutions; simply saying this is an easy one for those who are looking for an easy solution. Edited September 11, 2010 by Rommel Share this post Link to post Share on other sites
DMC_RULEZ 10 Posted September 11, 2010 Very nice and simple...... Thanks Rommel Share this post Link to post Share on other sites
00dc15 0 Posted September 11, 2010 @Rommel, Sorry I think my post came across badly, I wasn't having a go at you, just saying why there is a case for a complicated approach. If I could bring myself to insert a smiley face here I would, but I'm afraid I can't. Regards James Share this post Link to post Share on other sites
kylania 568 Posted September 11, 2010 That's essentially what my demo did, but I used an actual IED instead of Ye Olde Satchel of Yore. :) Clever use of the switch + waypoint though for the trigger. Share this post Link to post Share on other sites
meade95 0 Posted September 11, 2010 @ Rommel,Yes I have to agree this is the best approach if you don't want a very random element. In my case I play singleplayer only & write my own missions, so for me it must be random. Now in the current mission I'm making I want to have a briefing at a base then move to a Town & patrol it. I want the possibility of there to be an IED somewhere on my patrol route, but there must be 3 things for me: 1) The placement must be both random but also in a good place. In my script (currently still being written) this is achieved by setting the bomber waypoints around the town & then having him deploy the IED at a random time. 2) The bomber must then hide in a random place (preferably in a building) but where he can see the IED from. 3) The IED must not go off till the bomber knows about BLUFOR near it & there must also be a chance of a failed detonation (so you can request an engineer to deactivate it). Now all the above is possible in the mission editor without external scripts but must be pre planned, for example you select a site for an IED & place it, then you find a (or all) locations you can see it from, next you can program the AI to place it there & run to one of the locations you've selected. Now on playing that mission I know where it will be & where he is likely to be (even if I gave him 5 random places to hide), Yes I could setup 15 of these guy's round the town with a random chance of 1 of them being present in the mission, but it would take ages to do & also would have to be done all over again for another town or location (also it would be near on impossible (I think) to make it work with a random town, generated by the town module). What my script does is make it possible to have a placed AI do all the above randomly without any fuss by the mission maker, but would only really be required by people playing there own missions, If I gave you one of my missions it wouldn't be relevent because you wouldn't know where I've placed the IED or hidden the detonation man, I hope this explains why in certain cases a complicated approach is required. Regards James When you get your example done....Will you upload it as a editor mission so others can see it...without having to UNPBO... Share this post Link to post Share on other sites
00dc15 0 Posted September 11, 2010 @ Meade95, It will be a generic very easy to use script, which when the time comes I will fully explain how to use, the basic function which is now all but done is this: 1) Set up a unit with waypoints if required, set a random time limit for him to deploy the IED (ie 0 for placement at the start of the mission or 300 for sometime upto 300 seconds). Also another couple of bits of simple info will have to be placed in the execution list & that's it your done, the script does the rest. 2) Next the script will choose a random building between a preset minimum & maximum range & the IED placing unit will run to the building & start moving through the different rooms/ roof locations until he finds a location he can see the IED from, Note: he will (depending on each type of building position) first try the prone position, followed by the crouched position & lastly standing, if he should see the IED when prone the script will move on leaving him in that position. If that building doesn't give a view of the IED he will try the next type of building, after going through a certain number of building types he will then find a position not in a building but out in the open. If this script is run in a position where there are no buildings then he will go directly to finding a position out in the open. 3) Next the unit will stay there watching the IED (using binoculars if required). 4) When BLUFOR approach the IED an outer trigger will see if the IED Unit has knowledge of BLUFOR if he does then an inner trigger will cause the IED unit to detonate it within a random number of seconds. I am happy for people to use the script in any way they choose & change it if they like. I would like to put some sort of mission together but I don't know how easy it is to upload files (I may have to email it). You can follow my progress in this thread http://forums.bistudio.com/showthread.php?t=106774 & I will post in there when it's ready. Also Note: The script is only for some of the buildings in OA but with a little scripting knowledge & building class names you could add further building types. Regards James Share this post Link to post Share on other sites
meade95 0 Posted September 12, 2010 That's essentially what my demo did, but I used an actual IED instead of Ye Olde Satchel of Yore. :) Clever use of the switch + waypoint though for the trigger. kylania - Your work and advice is always fantastic......but I don't have the BAF/ patch yet - Have my OA running smooth as hell and didn't want to mess with anything nor did I find much in the patch to be worth it (for me)....so I haven't been able to see / play through how you got it working....via the editor. Share this post Link to post Share on other sites
kylania 568 Posted September 12, 2010 Fair enough. Though all BAF content should work for you anyway, it'll just be blurry. As long as you're fully patched you'll have "BAF Lite" and be able to use all BAF stuff, just at low resolution of textures. Share this post Link to post Share on other sites