Jump to content
Sign in to follow this  
rekster

AP Mines by Mapfact

Recommended Posts

I have been able to use the AP mines from mapfact in a few missions. biggrin_o.gif

What I would like to do, and have not been able to, is add them to a weapons crate. Is it possible to add them to a weapons crate, like you would reg. mines?

Not real savy at scripting so if it requires a script to do it, does anyone have a script for it?

Share this post


Link to post
Share on other sites

Thanks Benu, I went and registered at Mapfact and posted in the english forum.

Share this post


Link to post
Share on other sites

that's what i would do (not tested; especially in mp there could be problems):

write this in the initline of your ammocrate:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">TakeMines = MyAmmocrate addAction ["Take AP Mine", "RAE_TakeMine.sqs"]and copy this script called RAE_TakeMine.sqs into your mission folder:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? JOFMineAlle == 12 :TitleText [localize "STR_DN_JOF_Mine_kann","Plain Down"];exit

? JOFMine2 > 0 : goto "Weiter"

? JOFMineAlle > 0 : goto "Weiter1"

JOFMineAlle=0

#Weiter1

JOFMine2=0

#Weiter

JOFMine2=JOFMine2+1

JOFMineAlle=JOFMineAlle+1

_T = localize "STR_DN_JOF_AP_Mine_Legen"

JOFID3 = (_this select 1 ) addAction [Format["%2: %1.",JOFMine2,_T],"\JOF_objects1\AP_Mine2.sqs"]

exitafaik you can check with JOFMineAlle how many mines the player has. then you can make a script like<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">@JOFMineAlle > 11

MyAmmocrate removeAction TakeMines

Share this post


Link to post
Share on other sites

Thanks raedor, I will give that a try. I also plan to try it in MP. Hope I can add this to CTI maps. Would be nice to have for defensed around base. :grin:

I will let you know how the MP part works out.

Share this post


Link to post
Share on other sites

I created a simple mission test mission and added a empty crate, and added the intline you stated and put the script in the mission folder. I tried to test it in editor, but when I look at crate, it is empty. As far as I can tell I did what you stated

From mission.sqm

class Vehicles

{

items=1;

class Item0

{

position[]={9384.267578,14.974420,3693.200439};

id=0;

side="EMPTY";

vehicle="MFCTI115EmptyCrate";

skill=0.600000;

init="TakeMines = MyAmmocrate addAction [""Take AP Mine"", ""RAE_TakeMine.sqs""]";

I named the script just as you said to

RAE_TakeMine.sqs

Did I do something wrong?

Share this post


Link to post
Share on other sites

yes, you forgot to name the ammocrate "MyAmmocrate". but i didn't mention it sad_o.gif

Share this post


Link to post
Share on other sites

ok, i made a working demomission now. the scripts above do not work. so everyone who wants to get this demomission: PM me. wink_o.gif

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  

×