Cloughy 0 Posted July 5, 2007 Is there an easy way with createVehicle to add a M4 to the ground. I need to place it on the ground so it can be picked up by another Unit. I want to do this in the editor and not have a unit drop his gun so another can collect it. Cheers GC Share this post Link to post Share on other sites
ManDay 0 Posted July 5, 2007 Hey cloughy. It's pretty easy. Use the "WeaponHolder"-Vehicle for this. Its the "gorund-ammocrate" you may put weapons into: obj_wh = "WeaponHolder" createVehicle getPos player; obj_wh addWeaponCargo[ "M16A2",1 ]; regards Share this post Link to post Share on other sites
Cloughy 0 Posted July 5, 2007 Cheers mate, got it sorted. Dont seem to be able to pick it up though. I will keep messin. *EDIT* I have to drop my gun before i can pick it up. Also i cannot place this inside a building. I can see the gun at height 14 outside the hotel room, if i move the logic inside the building it wont work. Also if i set the gamelogic height to 5 metres above the hotel, i still cant see it, even though i can see it when the gamelogic is placed at the side of the building??? *EDIT* Cheers GC Share this post Link to post Share on other sites
ManDay 0 Posted July 5, 2007 Cheers mate, got it sorted. Dont seem to be able to pick it up though.I will keep messin. Cheers GC Yes I know. Thats a problem I wasnt able to solve myself (didnt even try but I dont think I may). Just wait a 15 seconds. walk away from the "crate" and walk back and it works. seems to be an issue of syncro. probably "reveal" will work (but actually i dont think so) Share this post Link to post Share on other sites
ManDay 0 Posted July 5, 2007 Logic? What logic? Forget about a logic! Logics are crap when it comes to positioning objects on the map. Use either markers or get the position in numbers (would be the best) Share this post Link to post Share on other sites
namreg 0 Posted July 5, 2007 I did it by changing the name unit class in the mission.sqm file. First I created an empty object... such as an ammo crate or a road cone, it doesn't matter, it just needs to be an empty object. In the init field write this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addWeaponCargo ["M4",1]; this addmagazinecargo ["30Rnd_556x45_Stanag",1] Give it a name so you can find it in the mission.sqm file and save the mission. Alt+TAB and go to windows, open your mission.sqm file in the mission folder and find the empty unit you just created. You will see a field that its name is "EMPTY" and below it you will see the name of the empty unit you just created "ROADCONE" or "AMMOBOXWEST"... whatever it is, change it to "WeaponHolder" and in the init you will see what you just wrote in the begining. Save the mission.sqm file Alt+TAB to open ArmA, and load your mission again, you will see the weapon just where the road cone was before. It works just as an "invisible" ammo crate. If instead of using this code <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addWeaponCargo ["M4",1] you use this one <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addWeaponCargo ["M4",5]; this addWeaponCargo ["M240",2] You will see a lot of weapons on the ground Here is the list of the cfgVehicles for ArmA. Biki ArmA|cfgVehicles If you change the empty unit name for a building name.... you can place any building wherever you want in sahrani. Hope it helped!!!! Share this post Link to post Share on other sites
Cloughy 0 Posted July 6, 2007 Sorted it. I used the sqm way to get the m4 in the hotel room. All i need now is a woman in there to have a real partteeyh with no threat from the commies.lol. Cheers GC Share this post Link to post Share on other sites