DanAK47 1 Posted October 7, 2002 I have been trying to make a soldier take a weapon from a crate. I added the weapon to the crate (a carl gustav) and put "this action ["TAKEWEAPON",CarlGustavLauncher] into the soldier's init field. He just sits there being artifically imcompetent. Is there any way to make this function work? Dan Share this post Link to post Share on other sites
IliektingsdatgoBOOOM 0 Posted October 7, 2002 I think you got the right line but in the wrong place. Try to put it in a trigger or waypoint and see what hapens. mysoldier action ["TAKEWEAPON",CarlGustavLauncher]; In a trigger activation Share this post Link to post Share on other sites
bn880 5 Posted October 8, 2002 I have never made a soldier take a weapon using a script, but don't you have to tell the guy where to get the weapon?? Share this post Link to post Share on other sites
Sui 0 Posted October 8, 2002 As I recall the syntax goes something like this: unit action ["Takeweapon",source,0,0,weapontype ] Where source is where the weapon is (ie. the name of an ammo crate or dead soldier) and weapontype is of course the name of the weapon (ie. "m16"). Not exactly sure what the two 0's are in there for, but I do know they're necessary as part of the arguement to be passed... Share this post Link to post Share on other sites
DanAK47 1 Posted October 9, 2002 Doesn't seem to work, but thanks for making this your first post Sui. I appreciate the effort. I'll just have to work around it. On that subject.. I have 32 posts and registered a year ago. Do I get an award..? Share this post Link to post Share on other sites
Sui 0 Posted October 10, 2002 Ahh sorry... there's a space in there somewhere. The correct syntax is: unit action ["Take Weapon", source , 0, 0, weapontype ] Share this post Link to post Share on other sites