daveygary1979 14 Posted February 25, 2011 I have nearly finished creating my first prototype ranger model and I have added a drop leg holster! I was wondering if somebody could explain how to create a proxy to add a weapon to the holster and if it would be possible by using hidden sections to make the weapon disappear when you draw the weapoln from the holster? If I can't I will just go ahead and use the bis m9 model and put that in there but I am trying to cut down on polys! Share this post Link to post Share on other sites
STALKERGB 6 Posted February 25, 2011 With regards to the poly count using the proxy wouldn't lower them AFAIK because it would still have to display the model and therefore render the polys that make up the model. I'm not sure if it is actually possible to do though, might be through scripting. IIRC there is a DevHeaven ticket to get BIS to implement this. Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted February 25, 2011 Small Introduction: When you will be add a Pistol on the Leg or West Pistol Holster, then here is a short explanation. Add a Proxy with path "\ca\weapons\m9_beretta" for a M9 Pistol (as Example can look the SF Units Samples from Jonny). But Stop that´s not all, you must add the Proxy on the Leg Selection "RightUpLegRoll", when you have the Holster on the Right Leg. Share this post Link to post Share on other sites
daveygary1979 14 Posted February 25, 2011 (edited) thank you stalker and christian, i will look into it further, can these be done with handguns that are non bis such as the glock models that where made? oh and how do you edit a proxy? what is involved in creating one? how do you place a proxy effectivly for it to work? oh and where would i find these sample models? Edited February 25, 2011 by daveygary1979 Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted February 26, 2011 oh and where would i find these sample models? Look here: http://www.armaholic.com/page.php?id=10403 Share this post Link to post Share on other sites
ardvarkdb 104 Posted February 27, 2011 You can also create your own proxy if you have a weapon model. It takes some time to find the correct position orientation so the model / proxy combo make sense, but it's basically your weapon model in a standalone p3d file that the proxy on the unit points to. When you select the proxy in the selections list in O2 on your unit you can change the path it looks for the model. Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted March 1, 2011 (edited) Question at all here: Have anyone a idea whit this part ? When used a Pistol (as example a G18), then should be the appropriate model in the holster. Currently shall on to the path of the proxy a static model (G18), that set can not change. Take a M9 is the G18 in the Holster. :rolleyes: When used a Pistol should of course be empty holster. Can implement this any way ? Edited March 1, 2011 by SyNcRoNiCzZ Share this post Link to post Share on other sites
lennard 447 Posted March 4, 2011 Question at all here:Have anyone a idea whit this part ? When used a Pistol (as example a G18), then should be the appropriate model in the holster. Currently shall on to the path of the proxy a static model (G18), that set can not change. Take a M9 is the G18 in the Holster. :rolleyes: When used a Pistol should of course be empty holster. Can implement this any way ? As far as I know it's not possible. Maybe only with scripting. Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted March 4, 2011 As far as I know it's not possible.Maybe only with scripting. Yes, most likely. Share this post Link to post Share on other sites
DAP 619 Posted March 4, 2011 Yes, most likely. Not only scripting. Also here need little model of weapon holder. Without any geometry lods. Attach it to the soldier and add pistol's copy in this holder. Share this post Link to post Share on other sites
norrin 9 Posted March 5, 2011 Funny you should have PM'd me about this Christian as I've just spent the last couple of days trying to add proxys to soldier units. As far as I can tell, you can add custom proxys to soldiers and weight them so they will animate and move with the limb that they are weighted to. However, you cannot animate the proxys themselves which means you can only add proxy models to units you can't add and remove them like you can with cars, planes etc. To get the proxys to animate themselves you need to add a bone in the skeleton of the model.cfg that relates to the proxy and that's fine except if you try and attach the new bone to an existing part of the unit skeleton. Then every time you load the new unit in game ArmA2 crashes. I'm guessing, so please correct me if I'm wrong, but I think this relates to how units have a very strict set of animations eg sidestep crouch etc and the moment you add a new bone to the unit skeleton, one that isn't defined in the player animations then the model doesn't know how to deal with it and the game crashes. Now finally to get to the point - what you want to do can be done using hidden selections instead. Just add some default pistol model to the holster in your soldier.p3d and then define it as a hidden selection in the config.cpp and the model.cfg. When the player is not carrying a pistol or has the pistol in hand you just set the texture using setObjectTexture player setObjectTexture ""; . Then if the player has the weapon in his inventory but not in his hand if ("pistol" in (weapons player) && !((currentWeapon player) isKindOf "pistol") then ... then setObjectTexture to the correct texture for the gun and it will appear in its holster. One final thing, the setObjectTexture command only works locally to the computer where the command is given. So you'll need to add something like a publicVariableEventhHandler addPublicVariableEventHandler to broadcast the texture change across the network. Hope this makes sense and helps. Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted March 5, 2011 @Norrin: Good approach, but it fails to the implement. :( Share this post Link to post Share on other sites
norrin 9 Posted March 5, 2011 Mate I can guarantee this works as this is how we animated the helmet/hat change stuff in the AAW units. Have you defined the part of the .p3d model you want to animate as a selection eg call it pistol. Then added "pistol" in the the hiddenSelections section of the config.cpp and also in the sections part of the model.cfg? Dare I say it but maybe PM me the files and I'll set it up for you. Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted March 5, 2011 Mate I can guarantee this works as this is how we animated the helmet/hat change stuff in the AAW units. Have you defined the part of the .p3d model you want to animate as a selection eg call it pistol. Then added "pistol" in the the hiddenSelections section of the config.cpp and also in the sections part of the model.cfg? Dare I say it but maybe PM me the files and I'll set it up for you. You got a PM. ;) Share this post Link to post Share on other sites
norrin 9 Posted March 6, 2011 (edited) OK, here's an example of a unit that has a pistol appear on his thigh when its in his inventory but he's not using it. http://norrin.org/downloads/OA/TextureEg/textureText.rar The linked archive contains an example mission that uses the unit and has the script files needed to make the system work. In addition, there's a binarised pbo, for you to try in the mission and also an unbinn'd addon folder so you can see exactly what I've done. This is what I did to the model (these notes are contained in the rar file) Resources used the soldier.p3d from the ArmA2 example models provided by BIS and the M9 model from the BIS released ArmA models Addon creates a single unit that appears under the Opfor Russian units called "Set Texture Guy". 1./ In O2 I deleted all the original selections from the M9 and defined the gun as a single selection called pistol 2./ Pasted the gun into the unit.p3d, note this also copies across the pistol selection to the model. 3./ Orientated the gun to match the leg position on the unit and then redefined the RightUpLeg selection to include the pistol selection. 4./ Added a hidden selection to the config.cpp, eg: hiddenSelections[] = {"pistol"}; 5./ Added an extra section to the model.cfg, eg: sections[] ={"osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury","clan","clan_sign","Camo","CamoB","pistol"}; 6./ Done! The rest of its done in the scripts that can be found in the test mission, note these should be incorporated into the addon. One final thing, I haven't done a lot of testing of this but it seems to be working OK on a dedicated server. EDIT:I may have just thought of a better way to do this, which does use proxys - will let you now if I can work it out Edited March 6, 2011 by norrin Share this post Link to post Share on other sites
SyNcRoNiCzZ 0 Posted March 6, 2011 Great Sample norrin. Thx. Share this post Link to post Share on other sites
jaac 0 Posted August 15, 2012 Hello Thank you for your explanation. Would it be possible to return the example download? Because the link is broken. And I did not understand everything. ;) Share this post Link to post Share on other sites