Results 1 to 6 of 6

Thread: Give weapon

  1. #1

    Give weapon

    Hey,

    Having a little problem getting something working in a mission. What im after is an ai enemy (of mission storyline important) to pretend he is surrendering (have removed the weapons in the init) I then set up a trigger so that once a player gets within a certain distance he pulls out a pistol and starts shooting.

    The script I have in the trigger is -

    boss1 setCaptive false; boss1 addWeapon "M9"; boss1 addMagazine "15Rnd_9x19_M9"; boss1 SetCombatMode "Red";

    What do I need to add to make him equip the weapon because all he does atm is stand there like an idiot.

    Cheers

    http://www.silent-warriors.co.uk

    Wanted - New recruits for Armored Corps, Excellent promotion prospects

  2. #2
    No idea if this would solve it, but you may want to give him the weapon loaded by running the addmagazine command before the addweapon command.

  3. #3
    Private First Class
    Join Date
    Jul 20 2009
    Location
    Durham, UK
    Posts
    23
    Author of the Thread
    Nope, unfortunatly not, thanks though mate

    any more takers

  4. #4
    Switch addmag and addwep like gal said. Then order/force him to attack or fire (for example at the person who activated the trigger).

    ---------- Post added at 12:00 AM ---------- Previous post was Yesterday at 11:59 PM ----------

    Part of a script from a mission I made long ago:

    Code:
      if ((boyfriend distance asker) < 10) then {
        if (!(boyfriend hasweapon "Makarov")) then {
          boyfriend addmagazine "8Rnd_9x18_Makarov";
          boyfriend addmagazine "8Rnd_9x18_Makarov";
          boyfriend addweapon "Makarov";
        };
        boyfriend commandfire asker;
      };

  5. #5
    Private First Class
    Join Date
    Jul 20 2009
    Location
    Durham, UK
    Posts
    23
    Author of the Thread
    Thats brilliant mate, just one question (since im not the worlds greatest scripter) what command would I have to put in to the code so that he fires on anyone who comes within a set distance as opposed to just one person (asker)

    or just as good what would be the script to make him shoot the person who activated the trigger (when more than one player in coop)
    Last edited by Fumbles [SW]; Nov 9 2009 at 21:21.

  6. #6
    Try this in the trigger:
    Code:
    boss1 setCaptive false;
    boss1 addMagazine "15Rnd_9x19_M9";
    boss1 addWeapon "M9";
    boss1 commandfire (thislist select 0);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •