Jump to content

Recommended Posts

Hello,

 

first im a completely noob and take scripts from this forum in my mission.
But now i cant find any solution or script to make this arrows (see on the picture) to move up and down like in the tutorials.

Maybe someone can help me out with a nice script?

 

unknown.png

Share this post


Link to post
Share on other sites

That could be far easier if you describe how did you spawn this arrow.

Share this post


Link to post
Share on other sites

This will spawn the selector( blue arrow as shown in your post ) and make it rotate.

_arrow = [ player getpos[ 10, getdir player ]] call BIS_fnc_VRSpawnSelector

Spawned 10m in front of the player in the direction the player is facing.

You can change the rotation speed by setting the variable BIS_VR_speed on the object( initial speed on spawn is set to 1 ).

_arrow setVariable[ "BIS_VR_speed", 10 ];

To make it bob up and down...

_h = _arrow spawn {
	params[ "_arrow" ];
	
	while { !isNull _arrow } do {
		_bobSpeed = _arrow getVariable[ "bobSpeed", 0.01 ];
		while {(position _arrow) select 2 < 2} do {
			_arrow setPos ( position _arrow vectorAdd[ 0, 0, 0.1 ] );
			sleep _bobSpeed;
		};
		while {(position _arrow) select 2 > 0} do {
			_arrow setPos ( position _arrow vectorAdd[ 0, 0, -0.1 ] );
			sleep _bobSpeed;
		};
		sleep 0.25;
	};
};

 

  • Like 5

Share this post


Link to post
Share on other sites

I spawned the arrow as an object.
I need this arrow on a specific position

Share this post


Link to post
Share on other sites
13 hours ago, Zerenco said:

I need this arrow on a specific position

Just change the test position I used in the call to BIS_fnc_VRSpawnSelector.

_arrow = [ /*some position*/ ] call BIS_fnc_VRSpawnSelector

 

Share this post


Link to post
Share on other sites

Thanks for all of youre help.
Last question.

Where should i put that?
In the mission.sqm? or description.ext?

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

×