00dc15 0 Posted September 11, 2010 @ Janat Are we're still not quite there then. I don't fully understand what is going wrong for you, without testing all this but when you spawn you soldier or group do they have waypoints or do they place the IED directly after being spawned, I just wonder if there getting stuck at a waypoint where the IED was created. I may be able to test it a little later. Regards James Share this post Link to post Share on other sites
Janat 10 Posted September 11, 2010 @ 00dc15 Thanks for your reply, I haven't set any waypoints. I have a trigger which is activated by BluFor presence. The trigger spawns a civilian and the ied script is run inside the spawn script. I'm keeping things simple in order to make testing easier so there shouldn't be any conflicting stuff in the mission. Share this post Link to post Share on other sites
00dc15 0 Posted September 15, 2010 @ 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 Share this post Link to post Share on other sites
kylania 568 Posted September 15, 2010 Impressive update! I'd ask to make the Civilian type configurable to any unit type and make the binoculars an option as well perhaps? That way you can't just look for civies with scopes to easily find the trigger man. :) Share this post Link to post Share on other sites
00dc15 0 Posted September 15, 2010 @ 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 Share this post Link to post Share on other sites
kylania 568 Posted September 15, 2010 Ahh perfect! For testing you might want to build in some markers that follow the guy (possibly even trace his path) and/or use the training aides, like the glowy red arrow to point out the guy easier. Share this post Link to post Share on other sites
00dc15 0 Posted September 15, 2010 @ 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 Share this post Link to post Share on other sites
gnarly_rider 0 Posted September 16, 2010 Holy Cow 00dc, that sounds like a magnus opus! REALLY looking forward to this, and the binocs touch sound perfect; I like to give players a fighting chance, and binocs is a subtle indicator of either IED or arty (Echos script if and hwen he gets this sorted: http://forums.bistudio.com/showthread.php?t=105517) Share this post Link to post Share on other sites
00dc15 0 Posted September 19, 2010 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 Share this post Link to post Share on other sites
Buzz_Fledderjohn 0 Posted October 16, 2010 (edited) Nielsen and Kylanias, great script guys, and very easy to use. Suggestion: add a parameter that sets where the triggerman hides. Right now they hide pretty far away from the IED. It would be nice if you could add different parameters for nearby, a little further, away, etc. Because when one of my triggerman places the IED, he actually sneaks THROUGH a house right next to the IED but then leaves the house and runs to his hiding spot 250 meters away. Setting how close the triggerman stays would allow you to make him hide in a house. :) Designating the hiding spot with a marker would be useful as well. It would also make sense to have the triggerman look towards the IED at all times. EDIT: I'll check out the other version too. Edited October 16, 2010 by Buzz_Fledderjohn Share this post Link to post Share on other sites
dissaifer 10 Posted October 30, 2010 It's so odd I keep trying to spawn a bomber but keep getting the trigger error in the report. _bomber = "TK_Special_Forces_EP1" createUnit [_hidePos1, _bombergrp, "Sweetbomber =this;", 0.8, "corporal"]; ied = [sweetbomber,"garbage","random","WEST"] execVM "BAF_iedScript.sqf"; Anyone seeing the problem with this? Share this post Link to post Share on other sites