Jump to content

sknam

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

2 Neutral

About sknam

  • Rank
    Private First Class
  1. Oh JBoy ! It works, thx mate! is it possible to command several snipers at the same time like this ? dummy=[mySniper,mySniper3,mySniper4,mySniper5,mySniper6 ["Middle","Down"]] execVM "JBOY\JBOY_UpDown.sqf"; B)
  2. Thank you Johnnyboy, It works! now I understood how to have the perfect time control. // ***************************************************** // ** JBOY_UpDown.sqf // ** by JohnnyBoy // ** AI will toggle between two stances with a delay between. Good for defenders to duck behind walls or windows, then pop back up. // ** Call: null = [dude, ["Up","Middle"]] execVM "JBOY\JBOY_UpDown.sqf"; // ** To start with an eventhandler, put this in unit's init: // this addeventhandler ["FiredNear",{ [_this select 0, ["Up","Middle"]] execVM "JBOY\JBOY_UpDown.sqf";}]; // this addeventhandler ["FiredNear",{ [_this select 0, ["Middle","Down"]] execVM "JBOY\JBOY_UpDown.sqf";}]; // // ***************************************************** if (!isServer) exitwith {}; // Parameters: // Parameters: _dude = _this select 0; _stances = _this select 1; _dude removeAllEventHandlers "FiredNear"; while {alive _dude} do { if ((unitpos _dude) == "MIDDLE") then { _dude setUnitPos "DOWN"; sleep (20 + (random 30)); } else { _dude setUnitPos "MIDDLE"; sleep (4 + (random 4)); }; }; I understand that the script works with " addeventhandler ["FiredNear" " If I want to control when to lunch the script, like from a trigger for expample I have a patrol in a street and when they entrer in the trigger: the snipers crouch and fire. Do you know what syntax I must use to lunch the script? regards
  3. Thank you Evil Organ, This very close what I am looking for! Thank you. In JBoy script you can see this: // ***************************************************** // ** JBOY_UpDown.sqf // ** by JohnnyBoy // ** AI will toggle between two stances with a delay between. Good for defenders to duck behind walls or windows, then pop back up. // ** Call: null = [dude, ["Up","Middle"]] execVM "JBOY\JBOY_UpDown.sqf"; // ** To start with an eventhandler, put this in unit's init: // this addeventhandler ["FiredNear",{ [_this select 0, ["Up","Middle"]] execVM "JBOY\JBOY_UpDown.sqf";}]; // this addeventhandler ["FiredNear",{ [_this select 0, ["Middle","Down"]] execVM "JBOY\JBOY_UpDown.sqf";}]; // // ***************************************************** if (!isServer) exitwith {}; // Parameters: _dude = _this select 0; _stances = _this select 1; _dude removeAllEventHandlers "FiredNear"; while {alive _dude} do { if ((unitpos _dude) == (_stances select 0)) then { _dude setUnitPos (_stances select 1); } else { _dude setUnitPos (_stances select 0); }; sleep (1 + (random 15)); }; with this scrips the middle and up postion are random from 1 to 16 second and same for the down position right? how I can modify the timing if I want the Unit is down 50 sec and middle only 5sec ? regards
  4. Hello guys, In the mission Editor, I often put enemy sniper or rpg on roof of buildings, Unfortunately they are always fast detected and killed before to be a real menace. I use this dostop true or disable ai move and I also use setunitpos to select the stance. If I Iet the vanilla ai system, they just go prone when the detect enemy, and can’t fire through the window or from the roof… I would like to make a little scrips lunched on the AI initialization field, or from a trigger to make an ambush like situation to make my AI switch from down to middle just a little time to firing and hide again for a certain time. I was thinking to something like this: (sorry I am not aware about the syntax) _myunit setunitpos “down†Sleep random [ 30, 50] <- Wait random time from 30 to 50 sec _myunit setunitpos “middle†Sleep random [ 5, 10] (the time to select a target and dofire, and hide again) #loop I am sure that if it works it can add a lot immersion in hostile zone. Please if someone can help me in syntax for the script and for the initialization to run an maybe add a variable in the timing… Thanks for reading. Cheers
  5. Hi there, Since OFP the ai always keep shooting to destroy ennemy MG or static weapon. It reduce ai progression a lot, a give a poor chance to MG to be a real danger because it is always shot the first. I'll like find the syntax to make a single triger who say: MG1 gunner = 0, then "MG1 setcaptive true" triger set on repeatedly and when a new ai comes as gunner an other triger who say MG1 gunner = 1, then "MG1 setcapive false" triger set on repeatedly do you think it is possible without an external script? Thank you cheers
  6. Great ! Thank you Przemek_kondor! I don't understand why the game allow this with a wait command: tmp = [] spawn{... but it works :o
  7. Is it possible to have a wait between 2 actions in an activation trigger? ab setunitpos "down"; sleep 10; ab setunitpos "middle" When I tried this, it looks like the game read and executes all actions immediately. Is there syntax to make a pose in the same activation field?
  8. Arf, I didn't realise that you have acces to radio only when you are group leader. I understand better now... Is there a way to assign a radio trigger to a specified unit, group, or side?
  9. Hi there, I searched before to post but I can't find. When I make a trigger activated by radio Alpha, Bravo.. And when I test my mission the radio is available, but when I change unite as player, it doesn’t work to test the behaviour of others units it doest work any more, it looks like it's breaking the link between the trigger and the unit as player. It is annoying because when I want test the behaviour of my AI, I am trying different units... I like to test the groups one by one to tweak weapon, position ect.. I generaly put all enemi units first, and decide at the end to who will be the player or mp players. In the mission SQS the player is set only one time and can't be edited? Or is there a trick solve that? Thanks
  10. Arf!! perfect this is what I need!!! Thank you I just had to change Landvehicle by helicopter :bounce3: Thank you Funican, I know the editor way to do that, but I don't want the helicoper and infantry in the same group, they have separte jobs... Thanks all !! ---------- Post added at 01:01 AM ---------- Previous post was at 01:00 AM ---------- By the way the helicopter sucks in Arma2 compare to OFP & Arma, they just crash on hill, trees, building. I tried the VFTCAS - Terrain Collision Avoidance System also the flying height 150... But not really better, the funnier is when a Cobra want shoot a tank and finish like a Kamikaze...
  11. Hi I would like to put automaticly units in cargo without to have to name the vehicle. (for large deployment, copy and past group near vehicle) is there a way to put something similar to this in a group leader init: {_x moveincargo Nearestvehicle} forEach units group this thanks, sorry for my poor English:cool:
×