Jump to content
Sign in to follow this  
Fumbles -SW-

Give weapon

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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:

 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;
 };

Share this post


Link to post
Share on other sites

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)

Edited by Fumbles [SW]

Share this post


Link to post
Share on other sites

Try this in the trigger:

boss1 setCaptive false;
boss1 addMagazine "15Rnd_9x19_M9";
boss1 addWeapon "M9";
boss1 commandfire (thislist select 0);

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×