Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

00dc15

Member
  • Content Count

    49
  • Joined

  • Last visited

  • Medals

Everything posted by 00dc15

  1. Well it's been a long time coming but my advanced IED script is ready, Ive packaged it with a small test mission ( in editor format, so you can see how it's done ). Note: The test mission requires Operation Arrowhead & the script is designed for OA as well but could be changed to work with ARMA2, the buildings part of the script will only work with the OA buildings. About the script ================ This script provides you with an easy way to have the AI place an IED & then semi intelligently find an observation location that they can see it from. They will place the IED at there current location either at the start of the mission (if the random time put in by you is 0) or sometime up to the maximum random time you put in. If they have waypoints these will now be deleted. Next they will run to a random position, the type of location depends on where they are & what options you set, they will 1st try buildings (only OA buildings & only the common town/village buildings), next they will try objects & finally random positions all within a pre-defined minimum & maximum range of the IED. If there are no buildings or you set a limit of 0 on buildings, they will search objects, again if there are no objects or you set the object limit to 0 then they will try random positions. When they get to a building they will move to different building positions (not all of them) as defined by the script, they will also try different stances at each building position where appropriate (1st prone, then crouched & finally standing) if they spot the IED in a specific stance then they will remain in that stance. The building positions & stance types are all configured in the script, for example some buildings may have 10 building positions but the IED men will only try 6 of them, this is to speed up the time it takes for them to find a suitable position & also because some building positions are either too close to another one or don't provide enough of a view outside. Likewise there stances are limited by building position, for example If the IED man is inside by a window he will only stand or if he's on a roof without a wall he will try all 3 stances or if there is a wall he will just try crouched & standing. When trying object locations or random positions they will always try all 3 stances. Once at a building position, object or random location a hidden dead body is placed by the IED, this body is then made visible for 5 seconds at every stance & then hidden before they move onto the next building or position, once they can see the IED the body is deleted. The body is the only way I could get them to detect the IED, in fact they don't detect the IED they detect the body, I tried objects both buried & on the surface but they can spot them through walls, the only things I found that work are men alive or dead & static weapons ( though they don't work as well as men do ), if anyone can come up with a better solution please do. Once a position is found they stay there & observe the IED ( using binoculars ( if this option is selected )) until BLUFOR get in range of the IED, at this point if the IED trigger man has knowledge of the BLUFOR unit the IED will be detonated after a random time of up to 5 seconds. Once the IED is detonated the IED triggerman is given a negative rating of 10000 meaning if he's civilian BLUFOR may now shoot him, also at this point his captive status is removed so if He's OPFOR, BLUFOR will now engage him. Also his never fire condition is now set to Hold fire, so if he's engaged he will shoot back. There is also an option you can set for him to run away, if set he will now sneak off to a randomly picked location within a certain minimum & maximum range, therefore giving you the option to chase him if you weren’t killed by the IED. Finally some other quick notes, there are 4 BAF IED's he can either use 1 of the 4 types or you can set it to random. There is a limit you can put on how many objects or buildings he'll try. There are 2 types of movement you can select when he's looking for an observation position, the first he will run to different locations & the second teleports him to each position (this is the quickest way). There is an option for him to use binoculars when observing the IED waiting for BLUFOR, this makes him more identifiable as an IED triggerman ( he will use binoculars for a few seconds every 20 or so seconds ). In order for him to use all the stances when detecting the IED, I found it problematic if he didn't have a gun, so the script gives him a Makarov pistol & ammo but if you want him to be unarmed you can set it so when he's spotted the IED the pistol is removed. I think that's about it, I'm no expert in scripting so the more experienced scripters may have a fit about the way I've coded it, but from my point of view it works. I will continue to improve the script & add further options, but if any one wants to re-write sections or adapt it to there requirements please feel free. Finally please feel free to post any comments or questions & I'll try to answer them, if you do change the script or have a better idea please post it in this topic. About the included mission ==================== The included mission ( well a few units thrown into the editor & some hints to tell you what to do) will show you some of the features of the IED script, due to the random operation of the script and the AI it will play differently each time to a degree, the first 3 IED’s will always be at the same position but the location the IED trigger men hide at will vary to a degree. The 2 IED’s in the town are deployed at a random time so the IED’s position will vary & determine where the trigger men may hide. Also due to the AI sometimes they will not notice the BLUFOR units approaching the IED & the way the triggers work, this leads to the IED not going off, to be honest I like this chance as it sort of simulates a failed detonation. In testing I’ve found this to not happen very frequently. You may find at the start of the mission nothing happens for a few minutes, this is to be expected as I've stopped the vehicles moving until the 1st 3 IED men are ready, this is normaly under 5 minutes. If & When you play the mission, once you've been dropped off & follow the patrol squad, don't be too realistic in your combat, just leave your unit at there origanal settings (formation, combat mode etc.) & follow the squad infront of you, don't target anyone or worry about scanning the horizon, you will get a chance to do that later. Finally, I never intended to upload this script, but because a few people wanted a more advanced script I've decided to, I have tested this version some 40 times & to me it seems to work well, but problems may come to light when more people use it, so think of it as testing it. I have never uploaded a file to the internet before so it could have gone wrong but this should be the link: http://rapidshare.com/files/420037637/IED_Script_mission_and_documentation.rar.html Warning read this: It has been brought to my attention (thanks to Gnarly Rider) that there are several errors in the Script documentation, these are as follows: 1) Put this in his Init Line: null= [this,10,5,Rnd,Sw,0,"bin","noGun","Run",I] execVM "IED_Man_v6.sqf"; The Rnd & Sw both need to be in quote marks ( "Rnd" "Sw" ). The I shouldn't be there (don't put it in). 2) Where ever you see either Rnd , GrndS , GrndL , GarbS, GarbL, Sw or Mo put the names in Quote marks. 3) null= [this,5,2,GrndL,Mo,60,"bin","","run"] execVM "IED_Man_v6.sqf" Again in this line the GrndL should be "GrndL" (in quote marks) & Mo should be "Mo" (in quote marks). I would just like to add that this script would not have been possible without all the tutorials out there & the information provided on the forums, I would like to thank everbody who has submitted information & taken the time to write these great tutorials. Regards James
  2. Hi, I would like to know if it's possible to get the range off the rangefinders into a script, what I want is to have an AI soldier looking through his rangefinder binoculars and then be able to put that distance from them into a script to compare to the actual range to confirm that he has line of sight (as the distance on rangefinders is stopped by buildings) ? Thanks for any help Regards James
  3. @ Callihn, If I understand you correctly, you don't want an AI to place or detonate the IED & you want the IED underground. If I'm correct then all you need to do is have a BLUFOR trigger that spawns an explosion. Regards James
  4. @ Antigoon, Glad you got it working, sorry about the error in my documentation, when you say he didn't have line of sight, how far out was he, I must have tested this 60 or so times in the early stages & I thought that alot but I had him as a Team switch option, so I was able to switch over & look through his eyes. The only small problem I had was with trees and bushes he could see a little more through them than he should have been able to, apart from that he was spot on every time. Because he has to detect the body spawned by the IED he should have to have line of sight. The only thing that will cock it all up is if you as a player were to reveal the body whilst it's there but even then you have to be part of the same faction as him, so if he's OPFOR you have to be OPFOR, the reason for this is by revealing the body you broadcast it to all units of your faction & at that point he knows everthing about the body, hence the IED, even if he's on the moon I think. Regards James
  5. @ Gnarly Rider, Oh, sorry, thanks for pointing that out, that's what happens when you rush out documentation at past midnight & don't test what you've written, I'll post a revised version link ASAP. I have no idea what the I is, another typing error I guess, don't put it in there. So much for your statement: Those are some serious notes you've included, and they are VERY informative and useful. Thanks again Regards James
  6. @ Gnarly Rider, Glad you like it, I've not looked into putting the file up with any of the sites yet, I thought for now I'll let people test it , see if they like it & that it works as expected. Also I plan to sort parts of it out a little better & add more function to it. Once I have a good enough version, I will look into hosting it with other sites. Regards James
  7. @ Gnarly Rider, I've sent you a PM, let me know if you didn't get it. @ Meade95, I've sent you a PM, let me know if you didn't get it. Regards James
  8. @ Kylania, Thanks, it's been a nightmare but I think it's working well now, once again thanks for your help & for posting your scripts & little missions. Having not edited & scripted since the old Operation Flaspoint Days, things have changed a little & I've forgotten alot, but your scripts & missions coupled with some great tutorials around & this forum made it possible. Regards James ---------- Post added at 11:45 PM ---------- Previous post was at 11:40 PM ---------- @ Gnarly Rider, You may be the first test subject, good luck & let me know how you get on. Regards James
  9. My Script is released with a small test mission see this post to read about it & download it http://forums.bistudio.com/showthread.php?t=107754 Regards James
  10. Hi, The sleep time numbers are 1 for 1 second, so 0.1 will be 0.1 of a second. I can't check the script out at the moment, so I can't say which numbers need to be changed but it should be easy to see. If you use this link: http://community.bistudio.com/wiki/Category:Scripting_Commands it gives you a decription of most of the commands ( watch out because some comments are incorrect, but 99% of the time it's good information). So you would in your case look for sleep in the list. Regards James
  11. @ Kylania, Cheers for the tips, when testing I have an IED marker placed were the IED is & a marker that gives me his position also able to Teamswitch to him if required, in the early stages of testing I had hints about house positions, knowsabout, buildings etc. I like the idea of a path trace, when I run further tests I may do that. Regards James
  12. @ Kylania, Yes it would be easy to make the binoculars an option & I shall do that in this or the next version, but when testing it believe me he's hard to spot when you've got a town full of civilians, IED's hidden in grass etc. & he's crouched on top of a building. The reason I made it this way was I wanted some sort of way of telling who the IED man is also he only looks through the binoculars once every 20 or so seconds, but at present I'm toying with the idea of him playing a move (as if he's pulling something out of his pocket) & then attaching a detonator in his hand just before you enter the trigger zone. At present your IED man could be either civilian or OPFOR as the target body is an independent bonesetter (un armed), infact I've not tested it but my belief is your IED man could be any faction apart from Independent, I will test this once the house data is in. Regards James
  13. @ Janat, Sorry I completely forgot to investigate the problem with your script, I hope you've sorted it out now. @ All, Well my script is now in it's final stages, all working & tested multiple times. I'm sure there will be some problems once it's tested or used by more people, but I don't think it could ever be 100% reliable with the AI that is currently possible. However as far as I'm concerned it works how I intended 95% of the time, now I'm sure there are far better scripters out there who could do a better job & if so please change it or start again from scratch. I intend to relese the script once some more building types are configured into it (a fairly quick & simple block of code taylored to that building type) & would hope it to be no more than a couple of days. I will then continue to refine it & add more parts to it. But for now here's what it does in this build: Note: This script requires OA & is configured for OA buildings, it could however be relatively easily changed or expanded to cover other buildings as they are simple small blocks of code that effectively remove certain building positions (that he would never see the IED from) & dictate what stance(s) he can use in a particular building position in a particular building type. You simply place a civilian in the mission editor & type the execution order into his init line, if you require the IED to be placed in a certain position then type 0 in the random time field. However if you want the IED to be placed randomly give the unit waypoints (cycling) & put the maximum random time to deploy the IED in the random time field. Now he'll follow his waypoints until the random time kicks in, when he'll place either the BAF IED you specified in the IED field (choice of 4) or a random one if you put Rnd in the IED field. What happens next depends on where he is, for now he's in a village/town. The script will pick a random building type out of the pre-defined list, next it will check there is at least 1 building of that type in range (100m), then come up with a final list of building(s) between 25m and 100m & randomly pick one. The man who placed the IED will run to the 1st pre-defined position in that building & work through all pre-defined positions until he either can see the IED or he runs out of positions in that building. If he hasn't seen the IED then the script repetes, picks another building (random type & random individual building), assuming he still can't see the IED this code repetes until the maximum buildings limit is reached which can be set by you (so 10 would mean he has to try 10 buildings, there is a failsafe built in in case there are no buildings in range). After this he next goes for objects as his hiding location & again there is a maximum limit of objects to try (again he must be able to see the IED to stay at the object) when using objects he will always 1st try the prone position, 2nd the crouched position & finaly the standing position & if the IED was spotted when prone that's the position he will stay in. In my tests he will normally pick a bush or tree (because there the most common), but he can pick any object, I would like to exclude a range of objects like road sections but I'm not sure if you can yet. After buildings & objects he will in a last bid attempt pick a random location within the minimun & maximum range from the IED (again he will start prone & has to be able to see the IED from the picked position or he'll pick another). When & if it ever gets to the point where he can't see the IED from any of the buildings, objects or random locations he will be deleted and the script ended. One last thing worth noting is you can define his choice of movement between locations either domove (so he has to run (slower to find a suitable location)) or setpos (so he's teleported to each location (much quicker to find a suitable position)). Once in position he will observe the IED area with binoculars & wait for an enemy to approach, when they are within 30m of the IED it will check if he knows about them, if he does & they enter the inner trigger 15m from the IED after a short random time delay he will detonate it. I have had situations in testing where he can see the IED but can't see you if you come from a certain direction because his view is blocked by buildings, I like this aspect as you have a chance to disarm it if you have an engineer, also if you are very covert you can again in certain situations get very close to the IED. The only thing I want to change desperately is how the detection of the IED is done, now I started off by using a sign hidden below the ground (because the AI can't detect IED's, mines or pipebombs, as far as I can see) but after multiple tests found that he can see any object through walls, buildings & all sorts. The only 2 types of things strangely enough he can't see though everything are people (assuming they're not in his faction) & static weapons. Which seems odd to me as a sign or road cone burried 1m below ground 70m away & behind 2 buildings without windows must be less detectable than a person just the other side of a wall. So for now I've had to place an invisible dead body next to the IED when it's deployed & then make the body visible for 5 seconds each time he needs to see if he can see the IED, once he's detected the IED the body is deleted and doesn't have to come back. That is the part I don't like but having said that I designed this script to be used whilst the player is well away from the IED area at a briefing or such like, so for now until a better solution can be found it will do. Thanks to Kylania I have a forum post to look at to do with line of sight, so once I've had a break I'll look into it for a later version. So that's the progress report, it's been hard work and soul destroying at times but now it works it's all worth it, just another 2 days & I should have it ready for relese. There are still lots more things I will add (like him holding a detonator) but that will be for further releses. Regards James
  14. Hi, when I made a little test mission where a shipping container is parachuted in to your location I just attatched the objects inside by playing around with the values in the array, I found it easier than trying to get memory point names, if there are even any. I think the place to start would be the config.bin file in which the data for the container is listed. I don't know if this is any help to you but after alot of searching I found the door names (allowing you to close the doors on the open container) posted by Kylania they are this animate ["door_1_1", 1];this animate ["door_1_2", 1]; this animate ["door_2_1", 1];this animate ["door_2_2", 1]; (where the last digit in each array can be 1 or 0 for closed & open. Sorry that does't help with your problem but thought you may need to know that if you didn't already. In answer to your 2nd part I believe that the memory point names arn't the same as house positions which is what your talking about. By the way just noticed your in Buckinghamshire I kept a C.V.R.T Sultan & drove round the Tring area alot before moving it closer to home, just glad with a name like Tankbuster I never came accross you pointing a LAW at me, apart from the fact that tecnically it's an APC more than a tank.
  15. @ CarlGustaffa, Good work, Using Hint format ["%1", player distance lasertarget player] gives me a return of the range displayed on the designator, which if great, but as you say & I've tried it doen't deal with range finders. Your idea would now work for me if I could find a way to get the AI to turn on there designator without the need for an enemy tank to be present, any ideas ? Thanks very much for your command, it will go in my list of code snippits as I know I'll need it in the future. Regards James
  16. @ 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
  17. So here is what I'm trying to do, I need to know if a non player controlled AI can see an object or not, after 1 weeks testing (I exaggerate not) and multiple spreadsheets/ line graphs of Knowabout values vs distance vs building positions I've not come up with a good enough method. My next line of approach is to give the AI a laser designator (as the laser dot is stopped by obstructions) & have him target the object (which at present is just under the surface (ie Hidden), now this part works but what I can't do is get him to turn it on (unless the target object is an enemy armoured vehicle). Now it seemed to me to be a simple case of getting him to fire it, but no, firstly when I fire it an eventhandler "fired" doesn't even trigger & secondly I've tried both giving him a fire command using laserdesignator, binocular & nothing as the muzzle, then laserdesignator, binocular & nothing as the mode, then laserbatteries as the magazine & also a dofire command. So my question is how or even is it possible to have him turn it on, before any suggestions are made of setting an enemy armoured vehicle below the ground, I've tried it & he won't target it in the first place & the hide command has the same problem. I've searched most forums for information about this & also looked into the config.bin file in weapons & found a laserdesignator section, but this still doesn't help me much. Thanks for any help. Regards James
  18. @ Kylania, Perfect, thanks alot for the link, I somehow missed this thread. All I need to do now is see how it works and run some tests with it, once again thanks for your help. Regards James
  19. @ F2k Sel, I think I've not explained myself correctly, I don't what him to use it for that purpose, what I'm trying to do is find out if an AI can see a certain object & I'm only using the laser designator because I know a) the dot doesn't go through buildings (so LOS is not possible) and b) I can find out with nearestobjects if the laser dot is near the object I'm trying to see that he has LOS to. Sorry I'm not really sure I've explained it any better but hopefully I have. But thanks for your input & example. Regards James
  20. Hi Kylania, Well possibly not, at present it's a Danger sign, but what I've got so far is get him to target it, select his laser designator then when he's looking at the sign through it, I've disabled his animations. Then all I need is a way to tell him to turn the thing on (which for me is 1 very simple mouse click, perhaps he needs a mouse but I can't find one under objects). Hi, F2K Sel, Thanks for your answers, I thought I could do it with the hide command but it didn't work how I thought it did. I have to hope there is a way to do something (puts his knows nothing about game mechanics hat on) so simple when as above I said it's 1 simple mouse click for me. The only last resort I could think of would be to have a 2nd designator that does not need switching on but is on all the time. However I have no idea if thats possible let alone where to start with addon making. Regards James
  21. Hi all, Thanks for your responses, what I was trying to do was have an AI use it to determine if when looking at an object he had line of sight to it. What I would have asked in my script is, is there a laserdot within so many meters of the object, therefore telling me yes he could see it (knowsabout doesn't work well enough), but it needed to be used through windows. What I have found since is that a non player controlled AI can't even turn a laser designator on in the first place, rendering the whole idea useless, but thanks for the replys. Please let me know if anyone knows a way to have the AI turn one on, thanks. Regards James
  22. Hi, I've had a search & couldn't find an answer, what I'd like to know is, is it possible to make/adapt the laser designators to pass through glass. Currently the dot stops when it hits the glass but I need it to hit the land or object the other side of the window. I'm not sure if this sort of data is coded into the weapon or into the game engine. I have no experiance in addon making & hope it may be a quick question for a skilled person. Thanks for your help. Regards James
  23. @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
  24. @ 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
  25. @ JDOG, Thanks for the response, the range displayed doesn't seem detectable with nearestobject(s) like a laser dot is but I think Kylania may have put me onto something good. @ Kylania, Thanks for the response,I have tested this with the AI & by initial testing it seems it could be what I need, it seems to return the range of the first object before the target object (I'm getting an AI to target me & then moving behind other objects), I need to do alot more testing yet. Thanks very much for pointing me in the direction of a command that I never realised existed, I really do need to go through the command list & look at all the commands that I don't know about. Edit: No I see it now Hint Format ["%1", unit distance cursortarget] returns the distance between where I'm looking and the unit, I need to get the distance between his cursorTarget & him, which I suspect may not be possible, oh well back to the drawing board. Regards James
Ă—