Jump to content
Sign in to follow this  
ayser

Removing weapons, Adding another, And equipping.

Recommended Posts

I know this is possible, I know this is easy, but I can't figure out what I have to add!

This is what I have so far

RPG_Only.sqf

_man = _this select 0;

while {alive _man} do { 
Removeallweapons _man;
_man addmagazine "PG7V";
_man addweapon "RPG7V";
_man addmagazine "PG7V";
_man selectweapon "RPG7V";
};

It does what it says, adds mags, adds weapons, but it REPEATS it. I don't know what I should add to completely kill the script once it's done. I don't want to "Sleep 10000000;" it, I just want to completely kill it once its done. Any hints? :P

Share this post


Link to post
Share on other sites

Try it this way.... no need to loop it on the guy forever.

_man = _this select 0;

Removeallweapons _man;

_man addmagazine "PG7V";
_man addmagazine "PG7V";
_man addweapon "RPG7V";
_man selectweapon "RPG7V";

Edited by twirly
Clarity

Share this post


Link to post
Share on other sites
Try it this way.... no need to loop it on the guy forever.

_man = _this select 0;

Removeallweapons _man;

_man addmagazine "PG7V";
_man addmagazine "PG7V";
_man addweapon "RPG7V";
_man selectweapon "RPG7V";

Ahh, thats the problem! Thanks a bunch!

Share this post


Link to post
Share on other sites

Hmm... This works fine, but when I walk up to the person, He doesn't have the RPG out, once he see's an enemy, he then pulls it from his back. Any way to just have it equipped automatically? I thought the "SelectWeapon" command did it, but I guess not.

Share this post


Link to post
Share on other sites

Ahhh... I don't know the answer to that one. Maybe someone else knows a way around that... I'd love to know myself now that you mention it.

EDIT: From the little reading I just did... maybe changing his behaviour and combat mode to COMBAT and RED.

setBehaviour

setCombatMode

Edited by twirly
Fixed mistake

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  

×