Jump to content
Sign in to follow this  
kocrachon

Get in Script Help

Recommended Posts

Ok, so I have an AC-130 script I got from Armaholic. I am having a little trouble using it because its so difficult to find the right spot to where you can man the guns.

So I was hoping to write a script that does this

"If soldier (any soldier near by) is distance 2 away, then add action Get In Gunner" and when clicking "Get In Gunner" it moves you to the appropriate gunner seat".

But I am gonna be honest, I do not know how to do scripting outside of the basic stuff like putting something in the init field. But as for an actualy SQS file or SQF file I am completly lost

Would anyone be able to show me and explain to me how something like this would work? I look at the SQFs and I get confused when I see stuff like _vec and so forth.

Share this post


Link to post
Share on other sites

Try this:

Create an actionscript which is executed from the init of the gunship = C130 (example: null=execvm "c130_addactions.sqf")

c130_addactions.sqf:

 
c130gunner1 = gunship addAction ["Get in GAU 12U Equaliser", "gau.sqf"];
c130gunner2 = gunship addAction ["Get in L60 Bofors Cannon", "bofors.sqf"];
c130gunner3 = gunship addAction ["Get in M102 Cannon", "m102.sqf"];

As you can see every action has a script executed, in these scripts you put the moveingunner commands.

gau.sqf:

 
_vehicle = _this select 0;
_unit = _this select 1;
_unit moveingunner gau; //name of the vehicle

Repeat this for the other guns (name the scripts as defined in the addactionscript.

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  

×