zodd 14 Posted December 9, 2011 Gday all, I have found a way to make a very simple script to simulate an RCIED. Note that this doesnt take line of sight into account but requires the following: 1. BLUEFOR (or targetted person) within a set range of the IED for a set period of time. 2. Triggerman within a set range. Therefore if the triggerman (or men) is (are) killed, or the BLUEFOR arent within the defined range for long enough then the IED wont function. What you need: Triggerman (named triggerman in this instance) - in the init field put: eyes = "FALSE"; (There may be a better location for this?) An object to be your IED (Can be any object - named m1 in this instance) Trigger to check if triggerman is within range to detonate - A trigger set to activation on anybody present, repeatedly. Size of trigger on ground is the area that you determine is close enough for the triggerman to be located to detonate the IED. (check the area - it will be map dependant, I am using 250m) CONDITION: triggerman in thislist; on act: eyes = "TRUE"; on deact: eyes = "FALSE"; Trigger to detonate IED - Size - I used 5m - this is up to you, again the size of this trigger is the area that your triggerman will detonate the IED if someone is inside it (ie. feels comfortable they are close enough for the kill) BLUEFOR, PRESENT, Once (dont want IED detonating multiple times) TIMEOUT 5, 5, 5 (You can change this - just means BLUEFOR has to be present for at least 5 seconds for the triggerman to detonate it) CONDITION: (eyes == "TRUE") AND (({alive _x AND side _x == west} count thisList) > 0) This checks if there is anyone in the trigger radius and makes sure they are enemy (ie. west in this case) ON ACT: boom = "Bo_GBU12_LGB" createVehicle (getPos m1); There you go - all set up! This will be fairly easy to modify, allowing multiple ways of initiation. In order to allow the IED to function, eyes must be true (ie. having eyes on the target) If you want other ways to trigger the IED you can have other triggers setting eyes = "TRUE"; This is a VERY basic way of doing it and I know there are a lot more complex and better ways to do it - however hopefully this can be of help to someone that is learning (as I am!) Also - Open to any constructive points on how to improve this or add functionality as I am only just getting into the scripting part too! ---------- Post added at 02:31 AM ---------- Previous post was at 02:27 AM ---------- Also - It is better if you put deletevehicle m1; after the activation of the ied (so it reads - ) boom = "Bo_GBU12_LGB" createVehicle (getPos m1); deleteVehicle m1; that way your tiny rubbish pile or whatever you used wont still be sitting there post BOOM! Share this post Link to post Share on other sites
f2k sel 164 Posted December 10, 2011 For future reference you may want to look at the way your using true/false. There's no need to have them in quotes. you just need eyes = true, eyes=false and then in the condition it would be (eyes) AND (({alive _x AND side _x == west} count thisList) > 0) and if your checking for false it would be (!eyes) AND (({alive _x AND side _x == west} count thisList) > 0) It does work though. Share this post Link to post Share on other sites