burroloco 0 Posted July 24, 2013 hi i want to make a script work with anim bolt, but has an animation when the unit is crouching, standing and lying. I've seen this link but not many answers http://forums.bistudio.com/showthread.php?62026-Bolt-action-scripting look fab.'s boltaction script I do not understand the variable _z in this part ;?(_z<=0.5):_soldier playmove "RifleLyingReloadBolt" ;?(_z<=1.2 && _z>0.5):_soldier playmove "RifleCrouchReloadBolt" ;?(_z>1.2):_soldier playmove "RifleStandReloadBolt" Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 24, 2013 It's the z coordinate, the height of the soldier. Share this post Link to post Share on other sites
burroloco 0 Posted July 24, 2013 It's the z coordinate, the height of the soldier. if the soldier is in mountain? i think, this is the position of is the height of an object within the dimension of the soldier and the soldier in the world. that object can be the head or "hlava" or the gun, but as record the height of an object within the height of a soldier and make it a condition Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 24, 2013 It's the position returned by the getpos function, ie the height above the ground, not above the sea level. Share this post Link to post Share on other sites
burroloco 0 Posted July 25, 2013 (edited) It's the position returned by the getpos function, ie the height above the ground, not above the sea level. for now I'm a noob in scripts, I use the command getpos complicated now try using the animation speed when crouching or lifting is, but it only works when the boltaction of the standing in the init field of soldier this addEventHandler [""FIRED"",""[_this select 0] exec """"boltaction.sqs"""" ""]"; _unit = _this select 0; _speed = (speed _unit); if (_speed ==0) then goto "boltaction1"; #boltaction1stand if (_speed ==0) then { player switchMove "XReloadBolt"; }; ;when unit goes to crouch position if (_speed <=-0.37) then goto "boltaction2crouch"; exit #boltaction2crouch if (_speed ==0) then { player switchMove "XReloadBoltCROUCH"; }; ;when unit goes to stand position if (_speed >= 0.37) then goto "boltaction1stand"; exit Edited July 25, 2013 by burroloco Share this post Link to post Share on other sites
burroloco 0 Posted August 6, 2013 (edited) It's the position returned by the getpos function, ie the height above the ground, not above the sea level. Does this is written as follows? _z = (getPos _unit) select 2 :confused: sorry for the spanish before the edit XD Edited August 11, 2013 by burroloco Share this post Link to post Share on other sites
max power 21 Posted August 6, 2013 English only please. Share this post Link to post Share on other sites
burroloco 0 Posted August 11, 2013 English only please. problems copying the translator, and the corrected Share this post Link to post Share on other sites
Macser 776 Posted August 11, 2013 Does this is written as follows?_z = (getPos _unit) select 2 Yes.That's the correct syntax.Of course where you have _z,you could put anything. Like _upaxis,or_Bananas.As it's a variable. But it's always better to make it descriptive. :) Share this post Link to post Share on other sites