Jump to content

00dc15

Member
  • Content Count

    49
  • Joined

  • Last visited

  • Medals

Posts posted by 00dc15


  1. 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


  2. 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


  3. @ Janat,

    I think I have a way round it for you, which is the way I've scripted it:

    You will need to change Neilsen's script, find the line below (near the bottom of his script)

    IEDtrigger setTriggerStatements ["this",format["%1 action [""TOUCHOFF"",%1]",_ai],""];

    And change it to this:

    IEDtrigger setTriggerStatements ["this","",""];

    Then below that put in these lines:

    WaitUntil {TriggerActivated IEDtrigger};

    _ai action ["touchoff", _ai];

    That should make the unit detonate the IED despite being nammed or not, but note I've not tested this in Neilsen's script as I can't exit my testing at present to try it, but that's how my script works.


  4. @ Janat,

    Hi,

    I think I remember reading somewhere in Neilsen's notes that the IED placing man must have a global name & I don't know why, something to do with his code I guess. I've not had a good enough look to see why he must be nammed but I suspect that could be your problem, if I'm correct in my thinking.

    Regards

    James


  5. Hi All,

    I'm afraid this will be a long post on the progress of my IED script (which has been an up hill battle), but worth reading.

    The script has got a lot more complicated than I first intended it to be, it does the following:

    1) You place a man in the editor & in his init field execute the script.

    2) The script now waits for a random time (put in by you).

    3) When the time kicks in the man abandons what he was doing & places a random IED, then finds a building within a minimum & maximum range.

    4) He runs to the picked building & starts working his way through the different positions (Some positions he doesn't bother with (for the reason that he could never see outside or it's to close to another position)) until he finds a position that he can see the IED from, if however this doesn't happen (which is quite often the case) he will move onto the next building (determined by the IED position) And so on until he finds a position that he can see the IED from. If he can't find any buildings (either there are none in range or he can't view the IED from them) then he will start searching for a position (within the minimum & maximum range) out in the open. Also note for each position he will 1st try prone, then crouched & finally standing up (his options are pre programmed by building type & position, to ensure he doesn't lay down by a window or behind a wall).

    5) Having selected his position he waits & observes the IED area (using binoculars if over a certain range) until an enemy (to him) are spotted by him within 25m of of the IED, at this point if his knowlege of the enemy is high enough & they get closer than 15m to the IED he will detonate it within a random time of between 5 & 10 seconds.

    6) He will now run to another random building/position & hide.

    The above code is all done apart from finding a position in the open (which shouldn't take long) but at present I've only got 2 building types in. Now I've spent about a week or more ( the reason for dedicating so much time to this is that I've got a serious leg indury, so I can't work, drive or walk until after an operation some time in the future) reserching buildings, positions & knowsabout values, I kid you not I have over 50 different spreadsheets & graphs of Knowsabout vs distance vs house position tests & this is all to do with him knowing about the IED.

    If anyone is interested here is my brief outline of what I've found. Firstly let me explain the mechanics of the script, when the man has placed an IED & got to his 1st building position a danger sign is created under the IED ( a danger sign seemed after extensive tests to be the best object), the man is then made to watch that sign for a specific amount time, when the time is up the sign is deleted & the man moves to the next position, where again the sign is created. The reasons for doing this is 1) he needs something to know about, because at each position the script asks if he knows enough to detemine if he can see the IED area. 2) The reason it gets deleted after every position is because I found in early tests if you leave it there his knowlege of it builds up at each position (so by position 5 he may well know enough to stop hunting for other positions & go onto the next part of the script but more than likely from this position he could never see the IED), also bear in mind that as far as I can tell from all my data he will have some knowledge of the sign through walls and all sorts, but it appears to be higher when he's got a good line of sight (like a player would need to see the IED). Another thing to note is that if the object is close his knowsabout value is higher than if it is further away, so I've had to alter his required knowsabout value based on 2m intervals up to 96m where it is nothing (unless he uses binoculars or a scoped weapon in which case it jumps up dramaticlly).

    Now I've been testing the script at a number of locations & it seems fairly good most of the time but at odd times it just falls apart and he sees the IED through a wall (where I would have to move a good 3m to see out of a window) so now I am currently adding the ability for him to only observe certain angles from a specific building position to allow for windows and doors. With this function added it should make the script 100% reliable which is what I striving to do.

    A quick example of how good the current fuctionality is the following test I conducted: The IED man hid in a building looking out of a window (infront of him) accross the road at the IED, due to the placement he couldn't see down the road to the right but could see to the left (due to another window), when I approached from the right I almost got up to the IED without it going off because he couldn't see me till the last second. However when I approached from the left he saw me alot earlier & was able to detonated the IED in time.

    Lastly a few notes about what I'm doing:

    1) I'm the 1st to admit that I don't know alot about .sqf, in the OFP days I used .sqs so people may well look at the script (when it's ready) & say o.k it works but what a mess.

    2) I am always open to suggestions & have had a few that I may implement once the base script is finished, tested & working.

    3) When I set out to make this script it was for a specific mission I was making, where UK forces had to patrol a town (so that is why I'm currently focusing on buildings).

    4) I have no idea how demanding the script is on different systems & with larger missions with more units etc.

    5) I don't play multiplayer so I have not coded that in if it's required.

    6) The code at present (for buildings), is only for OA buildings & I intend only to code 50% of the most common buildings in, however the code is in blocks so you could add other buildings if you know some .sqf basics.

    7) I hope when the script is finished people will test it & use it, or modify it to be better, it's up to you, I would like to think of it as my script, for my requirements & if your requirements are different feel free to modify it & re-post it.

    God knows if anyone is still reading this but that's about it for now, I'm fairly sure that I will get it all done within another week & will post it in this thread.

    Regards

    James


  6. @ Neilsen

    Well in my 1st version the failed detonation would just be some random lines of script that set the detection to detonation times randomly, as for him holding a detonator I have run some tests attaching an Explosive charge (small box with wires found under Empty/Objects (small)) to his hand & then locking the person into a switchmove so it he has his hands visible (not by his side), that part is fairly easy, I already have civilians walking about with document folders or briefcases under there arms or in there hands. In an Ideal world I'd make an object that is better and would be a hand gun class so he would pull it out when in danger mode. However that is out of my scope in the 10 years or so of writing missions for OFP/ARMA, I've never got into addon making.

    Thanks for the feedback:

    1) IED placement won't be restricted at all, what I have at present is you set a person of any faction in the editor (or it could use ALICE generated civilians) & set up some waypoints, at a random time he will deploy the IED, scrap his current task(s) & move to a detonation position. That way it could be placed where the mission builder wants it or on a route, in a building etc, he could even be on a bike or in a car & get out to place it. Note: the random time delay in placing the charge would be user selectable (put in 300 & it will be placed between 0 & 300 seconds, put in 0 & he will place it then).

    2) It's possible, is that not what your script does now.

    3) I like the idea of an array of observers, I would need to script some suspicious behavior for them, one possible would be them having & using binoculars to watch the IED from a rooftop at distance.

    4) In my early tests with a simple random detonation time trigger, if you sighted the IED & sent your engineer to defuse it sometimes he would or other times he would get blown up by it.

    I hope that helps clear up my plan, now I must get back to the scripting.

    Regards

    James


  7. Hi,

    @Neilsen - Good script, thanks for sharing it with us.

    It may interest everone to know that since Kylania discovered the muzzle data for BAS IED's, I've been experimenting with a script for placing & detonating them. There are a few things I want from my script:

    1) For a person to be able to place an IED randomly but ideally in a good position (i.e not on the road or in a building) & also where the Enemy are likely to walk in the mission.

    2) For the person to hide nearby ideally in or on the roof of a building (but out of the blast range) & watch the IED.

    3) For him to only activate it if he knows about the enemy near the IED.

    4) For there to be a possible delay (failed detonation), so your engineer can defuse it.

    5) Ideally the person would have hold of a visible detonator in his hand, that way if you scan buildings as you move through the town, you may see he is the detonator man & kill him before he sets of the IED (I plan to use civilians as they blend in to the surroundings better).

    With all the above I think you could have a good, random script, I have done anvanced testing of most of the above & just need to finish the script.

    I don't think there's an easy way of making sure the detonator man can see the IED but with the added knows about & him being positioned by a window or on a roof watching the IED we should get some results. However if your mission requires that an IED will go off you would need to use Neilsen's script.

    I am hoping to have the script finished in a few days, just reserching house types, positions & ratios of houses in villiages/towns.

    If anyone has any suggestions please feel free to post.

    Once complete I will post it here, in this thread.

    Regards

    James


  8. @Callihn,

    Just tested in both ARMA II (No addons & without OA) & OA.

    1) Trucks (US) (Ammo) have M119 HE rounds onboard.

    2) Support trucks arrive when support is requested, the only thing you have to do is move the truck alongside the M119 & then when you get back in the M119 it gets reloaded.

    3) Sorry but your original post said nothing about not reloading via scripts.

    4) I Don't understand the later part of your post about no point in scripting things that are already there......

    In answer to your revised question in your last post, there are 2 ways I see:

    1) When editing the mission make sure an Ammo truck is parked just behind your M119 (as if it was in position to hitch up to it), then when you fire a round it reloads a round.

    2) Call a Support truck & when the driver get's out, you get in the truck & drive it to your M119 then getout, get back in the M119. When your back in your M119 it will be reloading.

    Note: The only time I couldn't get this to work is if you remove the magazine from the M119 in the mission making stage (so your M119 has no rounds), then it seems the ammo truck doesn't know what to load. Also I've not tried any other round types i.e. Illum,WP etc.

    P.S in OA the US vehicle ammo box works if nearby

    Regards

    James


  9. I think the way forward would be to firstly link the wounded soldier & the soldier dragging him to the First Aid modules then use a (possibly) yet to be discovered action command for the AI to drag or carry him (if there is such a command).

    The magic number to have a First Aid Linked Person rolling round on the floor is "this setdammage 0.89", as discovered by someone on the forums (sorry can't remember who).

    Regards

    James


  10. I think I'm correct in saying, that from a scripted point of view you can just add more magazines to it's init, I added a WP magazine to a mortar & when I got in it, I had to change to it, from standard. When that ran out I changed back & fired standard rounds. Therefore that proves that they accept at least 2 magazines of different types, so far I've not tried any more combinations.

    I assume when people are backing ammo trucks upto them they've checked that the ammo for that weapon is in the truck, silly question but just a logical thought.

    Regards

    James


  11. @ 50.cal

    Hi,

    To use the attachto command put something like this:

    bag1 attachto [Car1,[-0.9,-1,-0.4]] ; bag1 setdir 090

    The above command will attach bag1 to car1 and the setdir command changes the direction of the object to align it on the side of my Jackal in this case, in the 1st array -0.9 is out to the side of the vehicle (Left side), (from a plan view think of the center of the vehicle as 0,0,0 though it's not always at the center), so on the right side would be a + number, -1 is the forward or Backward directions & -0.4 is Lower or higher on the vehicle. Just play around with the numbers till it looks correct, but remember to get the direction & Orientation correct before moving it into i'ts final by adjusting the attachto values.

    You can also need to use the SetVecorDir Command http://community.bistudio.com/wiki/setVectorDir or the SetVectorDirAndUp command http://community.bistudio.com/wiki/setVectorDirAndUp to get the object orientation correct.

    Note: If you have the BAF Addon the 1st line of code will put a mortar bag on the left rear side of a Jackal but 1st create a bag with:

    bag1= createvehicle ["M252_US_BAG_EP1", position player, [], 0, ""]

    Another command required is: detach bag1 which removes it's attachment with car1 in my case, this would be called when the player has taken the bag or added to an action when near the vehicle (Note: with backpacks if you select take bag (in game) it will be on your back & not visible on the vehicle till you put the bag down when it will be attached back on the vehicle)

    Hope this Helps

    James


  12. Hi,

    I hope I understand you correctly, if I do then yes it's possible if the AI are under your command. You can send an AI with a backpack weapon (i.e. Mortar or tripod) to a vehicle & have them bring up the gear screen, then click the left arrow to put that pack in the vehicle. You can also do it yourself.

    I have only briefly tried to add backpacks to cargo via scripting & as you said it doesn't find the entry, in the end I attached them to the vehicle (attatchto command).

    All the above was just tested with a MTVR truck & BAF on Takistan.

    Regards

    James


  13. Hi,

    Sorry I can't help you, but I've spent the best part of a day working along the same lines as you, I feel I've tried every command (except the correct one) to make an AI person just take an IED out of his inventory and put it on the ground, I too have noticed v1 has problems, so I've used v2 for my tests.

    I feel should we get an AI to place one the touchoff/timer part will be as piece of cake with the action you describe, as I've used in the past to have the AI blow stuff up.

    With out the ability to open the pbo's (my 1st port of call was and always has been to see how BIS use them in there missions) I have now given up till we get some further info.

    The thing that bothers me is, in the BAF campaign (I'm only on the 3rd mission) for an IED in a market they have a pipebomb or timebomb not the new type IED's, so is it not possible they arn't usable by the AI or scripting.

    Also have you noticed that giving an AI OPFOR the IED backpack results in an IED being created at his feet & stays there when he moves.

    I can only conclude there is far more to this IED part than meets the eye or it's just non functional in the way I/We are trying to use it.

    It's a shame I was looking forward to AI OPFOR or CIVS runing around placing IED's and setting timers etc.

    On a side note is there any way to touchoff or set a timer on a created Pipebomb/Timebomb by scripting or the AI, that could be a workround.

    If I come up with any more I'll add it to this topic.

    Regards

    James


  14. Hi,

    Just tested it, seems to work for me either with 2 AI members or Myself and an AI member, if you've got 1 part of the mortar then get the AI to drop the other part on the ground, then move close to the mortar or tripod bag and point your gun at it untill you get the backpack name displayed, you should now have an option to assemble it.

    If your using AI then get both members close to each other, then get 1 to drop 1 part, then the other 1 will have an action to assemble it. The only tricky part if your assembling it as a Player is pointing at the correct place on the dropped part to get the name and action up (the selection area is very tight on crew served weapon packpacks).

    Having re-read your post I think your problem was not having the mortar or tripod on your back when trying to assemble it

    Hope this helps you.


  15. One way would be to create an FSM script for them if you search for 'FSM editing' (currently on page 3 of this forum) you will see a post from Crashdome about have you read my tutorial, download it & one of the FSM editors. In the tutorial you will find a mission with his FSM script which makes a group act like the dismissed wpt. but you can edit the FSM file so they dont move as far away, the tutorial explains all you need to know, the other way would be to run a standard script that gives them random moveto wpts. in a certain radius but I would advise the FSM way as there is far more to them.

    Hope this helps you.


  16. As far as I can tell the only way would be to dammage it, I spent some time setting up explosions near or on the tail assembly, the problem is that all ordinance I tried apart from pipebombs drop before exploading, in the end I was creating a grenade above and infront of the chopper so it would fall on the tail boom, but it only worked 70% of the time due to chopper speed and banking, Next I'm going to try creating some bullets in the tail rotor & see if that does the job, if so I'll post the script code here.


  17. I don't know why, it makes no sence to me but I use the following as a workround:

    Option 1: Press space and hold- you should now see the team menu option (as in OFP).

    Option 2: If Unit 2 (e.g) is part of team red (e.g) press and hold Shift and F2 this will select all units in that team, the only problem is once you let go os Shift & F2 they will deselect, therfore you must issue commands 1,6 (e.g) (Stop) with the Shift & F2 key held, again I think you have to do the same with option 1.

    Hope this helps you.


  18. Hi, Thanks very much for the best MOD ever, one question though, when I run the MOD I get no AI Personal radio calls i.e. 2 is down or Rogger when you ask them to move, I assume this is how it's ment to be ?

    If so is there a way of changing the config to get radio calls back as I only play with the AI and like to hear notifications when I tell them something.

    Thanks for any help.

×