Jump to content
Sign in to follow this  
burroloco

bolt action?

Recommended Posts

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
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

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
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 by burroloco

Share this post


Link to post
Share on other sites
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 by burroloco

Share this post


Link to post
Share on other sites
English only please.

problems copying the translator, and the corrected

Share this post


Link to post
Share on other sites
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×