Chomps 0 Posted July 18, 2002 Two questions: First, what command would I need to make a unit drop a weapon on the ground? The second one may be more complex. Is it possible to place a single weapon somewhere in the map (meaning not on a person or in a vehicle or crate)? I guess a script involving spawning a person with the weapon, having him drop it, and then removing the person would work, but is there a simpler way? Share this post Link to post Share on other sites
suma 8 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Is it possible to place a single weapon somewhere in the map?<span id='postcolor'> Use createVehicle to create an object of following type: "SecondaryWeaponHolder" to hold secondary weapon (LAW...) "WeaponHolder" to hold primary weapon, handgun or magazine This holder is empty by default and it acts like an ammo crate - you can use addMagazineCargo and addWeaponCargo functions to add weapon or magazine to it. Share this post Link to post Share on other sites
suma 8 Posted July 19, 2002 9--></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Chomps @ July 19 2002,019)</td></tr><tr><td id="QUOTE">First, what command would I need to make a unit drop a weapon on the ground?<span id='postcolor'> To drop magazine use: soldier action ["drop magazine",soldier,0,0,"m16"] To drop weapon use: soldier action ["drop weapon",soldier,0,0,"m16"] Share this post Link to post Share on other sites
-CCCP-Stalker 0 Posted July 19, 2002 But can you the EXACT command to create a weapon on the ground ? Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 I tried the method mentioned above, but I must be doing something wrong...I am using the following lines: _grnd = "SecondaryWeaponHolder" createVehicle [_xposm, _yposm, 0] _grnd addWeaponCargo ["LAWLauncher", 1] _xposm and _yposm are both defined earlier in my script. What am I doing wrong here. Thanks in advance for any help! Share this post Link to post Share on other sites
Chomps 0 Posted July 19, 2002 I got it to work!! Suchey, I used your exact code in a script but replaced your coordinates with a simple getpos for a gamelogic on the map (I am a very lazy person). You may want to check your coordinates. Thanks a lot, Suma!! Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 Thanks...I got it working as well...it seems the weapon was getting partially burried by the new bumpy terrain...I moved to flat ground and it worked fine. Share this post Link to post Share on other sites
-CCCP-Stalker 0 Posted July 19, 2002 So i just need to replace [_xposm, _yposm,0] with the name of Game Logic ? Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 yes....or you could specify co-ordinates there as well. However, it seems that so far the dropped weapon model is not an exact location in relation to the co-ordinates...this is to say that it will not appear in the exact location that you place the 'weaponholder'. Perhaps Im doing something wrong, but it always seems to appear to the left or to the right of the spot which the holder is placed. Share this post Link to post Share on other sites
Chomps 0 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote ([CCCP]Stalker @ July 19 2002,16:52)</td></tr><tr><td id="QUOTE">So i just need to replace [_xposm, _yposm,0] with the name of Game Logic ?<span id='postcolor'> Here, I posted the info on OFPEC... http://www.ofpeditingcenter.com/cgi-bin....start=0 Look at the sample code. Share this post Link to post Share on other sites
Chomps 0 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suchey @ July 19 2002,17:06)</td></tr><tr><td id="QUOTE">yes....or you could specify co-ordinates there as well. Â However, it seems that so far the dropped weapon model is not an exact location in relation to the co-ordinates...this is to say that it will not appear in the exact location that you place the 'weaponholder'. Â Perhaps Im doing something wrong, but it always seems to appear to the left or to the right of the spot which the holder is placed.<span id='postcolor'> Are you trying to place the weapon on top of another object, like on a building or wall? Share this post Link to post Share on other sites
suma 8 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suchey @ July 19 2002,17:06)</td></tr><tr><td id="QUOTE">this is to say that it will not appear in the exact location that you place the 'weaponholder'. Â ... it always seems to appear to the left or to the right of the spot which the holder is placed.<span id='postcolor'> It is quite possible weapon holder model is excentric - if you see the offset is always the same, model excentricity will probably be the case. Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 In resistance when you drop a single pistol clip it shows a model of a 'pack' of some sort. However, when you try to drop a magazine using the method described above it will simply drop an empty(no ammo) instance of the actual gun model. Is there a way to get the packs to show up using the method above or another? Share this post Link to post Share on other sites
Chomps 0 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suchey @ July 19 2002,17:54)</td></tr><tr><td id="QUOTE">In resistance when you drop a single pistol clip it shows a model of a 'pack' of some sort.  However, when you try to drop a magazine using the method described above it will simply drop an empty(no ammo) instance of the actual gun model. Is there a way to get the packs to show up using the method above or  another?<span id='postcolor'> Just use addMagazineCargo ["M16",5] on the Weapon holder, it works for me, I see the pouch. Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 OK...heres what I found so far...it seems that if you use some varieties of handgun mags that they create an emtpy model of the gun itself (havent tested this completely yet)...using other types of ammo will create on of the 'packs' as mentioned above. For direct/exact placement of the weapon on the ground, you can use the setpos command AFTER first placing and filling the WeaponFiller item...EXACT placement of the item does not work using the coordinates durring creation of the weapon/mag on the ground. For example...if you use: grnd = "WeaponHolder" createVehicle getpos player grnd addMagazineCargo ["M16",5] an equipment pack will spawn but it will not be at the exact location of the player...however...if you immediately follow the above commands with this: grnd setpos getpos player the equipment pack will appear directly at the players feet. Hope you find this useful! Thanks to all the folks that provided info on this thread so far. Share this post Link to post Share on other sites
suchey 0 Posted July 19, 2002 ok...another question...everything works except that other players cant see the created weapon on the ground...if I use the script in a multiplayer mission, only I can see the weapon laying on the ground...anyone have any insight into this problem? Share this post Link to post Share on other sites
suma 8 Posted July 19, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suchey @ July 19 2002,21:40)</td></tr><tr><td id="QUOTE">if I use the script in a multiplayer mission, only I can see the weapon laying on the ground...anyone have any insight into this problem?<span id='postcolor'> If you want all players to see weapon, you need to execute addWeaponCargo on all computers. Status of weapon/magazine cargo is not transferred accross network, as it would use too much bandwidth. Share this post Link to post Share on other sites
Global Enforcer 0 Posted July 19, 2002 i cant seem to raise the hight of the gun..im trying to place the gun on a desk. im trying to put a gun on the desk in the office, in fisrt mission (i pboed the res.pbo) and i want a gun on the desk near the radio (radio3), but i cant raise the hight of my gamelogic is there a way to, like setpos to radio3? or sumthing? Share this post Link to post Share on other sites
Lt_Damage 0 Posted August 28, 2002 Probably not a good idea to request help in the same sentence that you tell them you modified their res.pbo file Share this post Link to post Share on other sites
Chris Death 0 Posted August 28, 2002 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Probably not a good idea to request help in the same sentence that you tell them you modified their res.pbo file <span id='postcolor'> But probably they take it as a compliment; "he doesn't want to create his own mission-base, because the existing one is already superb" Did you try to raise the gamelogic, or did you try to raise the weapon holder, when creating it? Try the second method, if you haven't yet. ~S~ CD Share this post Link to post Share on other sites