Sign in to follow this  
Followers 0
kronzky

Dynamic Mine Field

86 posts in this topic

Here's a module that lets you create any type of mine field with one call to the script.

You designate the active area via a rectangular marker, and then that area will fill be filled randomly with the types of mines you need.

• The mines can be specific to certain classes. (e.g. only anti-personnel, or only anti-tank; or cover a range of classes, e.g. any vehicle.)

• You can define the explosion strength and the activation radius.

• How much of the mines is visible is up to you (they can also be totally hidden).

• By default the mine field will be filled with an amount dependent on the size, but you can also specify a fixed number of mines to use.

• Qualified classes (engineers & special forces) are able to disarm them via the normal ArmA interface.

defusing.jpg

• If the mine field is too dense (i.e. where mines end up with an overlapping activation radius) they may trigger each other when detonating, leading to a chain reaction.

• You can also opt to automatically create warning signs at the edges of the mine field (in this case the mines are indicated by road cones for demonstration purposes).

minefield.jpg

Available at my site.

Share this post


Link to post
Share on other sites

awesome work , err i think the link leads to the object placer ?

Share this post


Link to post
Share on other sites
... err i think the link leads to the object placer ?

Just scroll a bit down smile_o.gif

Share this post


Link to post
Share on other sites

Cool stuff, Kronzky! You should try to get your stuff integrated in BAS f, that would really make it strong! smile_o.gif

Share this post


Link to post
Share on other sites

@Kronzky: i would like to use this work, but for objectives.

can we somehow use this idea to set an objective as done?

ie, can we, after disableing all mines, have a trigger that makes a "1" objstatus "done" to show in briefing?

How can we do this?

Share this post


Link to post
Share on other sites

I think its not the best place to "hide" this very nice script however, just download the "objectplacer.zip" open the rar file and look inside the "objectplacer" folder, there you find the sqf script.

The mineplacer folder is empty.

Share this post


Link to post
Share on other sites

This is all script material, yes?

No modified/new models or mission dependencies?

Foxhound's vbs1 mine script allowed to choose activation (east, west, etc) wich was in my opinion quite usefull if we wanted the players to face a minefield but pretend that the OPFOR (a.i.) knew where the mines were placed (and avoid them).

If the mines are not visible they wont actually be there? Im asking because of performance if we set up very large mine fields.

I will check it out, mucho thanks for your work K thumbs-up.gif .

Share this post


Link to post
Share on other sites

As far as I have understood this script creates triggers for each mine the script creates.

Indeed my script doesnt do that, but its not yet converted fully to arma.

Share this post


Link to post
Share on other sites

Oh, wow... Gone for an hour, and a deluge of replies... wink_o.gif

Well, I'll try to address them one by one.

Download Link - Since the minefield script started as a spinoff of the objectplacer script, I figured I'll just leave'em bunched together.

But as this seems to cause a lot of confusion I've now given it its own page and download location.

Objective Flag - There is a global array that contains all the still active mines (KRON_MF_Mines). If that one is empty (count KRON_MF_Mines==0) that means they have all either exploded or been defused.

If you plan to use multiple mine fields, then it would get a bit more complicated, as all mines of all mine fields would end up in this array. But you could circumvent this by only creating one mine field at a time.

Addons - Everything is done via scripting. No addons required. I'm not sure if anybody has done any mine models for ArmA yet, but if they're defined properly (i.e. the AI will ignore their presence) they could be used together with this script, as the mine model is independent of the mine trigger.

Invisible Mines - Right now I would suggest to use the Helimarker model (HeliHEmpty) for invisible mines. Game Logics actually use more resources than a mine model or the chopper pad, so using them wouldn't gain you anything.

Activation - As I said before, I left the activation side option out since it didn't seem very realistic. (Even if you placed the mines yourself, that still wouldn't mean you could easily spot or avoid them.). But if the general opinion is that it would indeed be a useful addition, then I can definitely add it.

In the meantime, you could change it yourself, by searching for the line _trigside="ANY";, and changing the string to the side that should trigger the mine.

Share this post


Link to post
Share on other sites

In OFP, I remember that Ai would be able to avoid anti-personal type mines. Is that true with Arma?

I have been looking for good Anti-personal type mines for a long time.

Share this post


Link to post
Share on other sites

@Kronzky...been looking for some great mine scripts and this seems to fill the bill. great job, hope to see more works of such superb quality!

Be testing this now..

Outside Corazol...SLA Forces prepare to launch an offensive but even as they do, the general area seems quiet...

As the first troops move across the border, and into RACS territory, not even a sound is heard than...BOOM! a mine explodes going off everywhere denting the SLA first wave to bits. bloodyslags

YOU JUST MADE MY DAY! LOVE THIS,

with regards,

GGH yay.gif

Share this post


Link to post
Share on other sites

Great biggrin_o.gif I was waiting for some nice mines.. and these are perfect.

mine.jpg

Can you use this sign? if you do PM me and you can have it wink_o.gif

Share this post


Link to post
Share on other sites

Cool sign! smile_o.gif

But since this is supposed to be a pure scripting solution, without the need for any addons, I guess we better keep it separate.

But I've changed the code in V1.1.0, so that it's easy to use any addon signs if you so wish, by just assigning its name to the _warnsign variable.

I've also added an internal "density" variable (to define per how many square meters one mine should be placed - as per ColonelSanders' recommendation), so that can be changed easily.

For now these options are all internal (you have to change the script), since if we're getting too many parameters then I may have to change the whole call syntax, as nobody will be able to remember what parameter goes where anymore.

I will probably use parameter/value pairs like in my Urban Patrol Script (e.g. execVM ["range:",1,"depth:",0.01,"density:",5]...)

If you guys would prefer it that way, then speak up quickly! Otherwise you'd end up having to change all the calls later on.

Share this post


Link to post
Share on other sites

Kronzky  good work on the scrip

Quote[/b] ]I will probably use parameter/value pairs like in my Urban Patrol Script (e.g. execVM ["range:",1,"depth:",0.01,"density:",5]...)

go the way of your Urban Patrol Script so as theres standardisation between all your scrips

VXR

nice sign why dont you post it for the whole community

bk1276

Share this post


Link to post
Share on other sites

Ok - I've changed all the parameter definitions to name/value pairs now.

That'll make the calls a bit easier to remember, and it'll give me some more flexibility later on, when perhaps adding other options.

Because you now don't have to worry about an overwhelming number of arguments anymore, and what their specific position has to be, I've also added the option to specify which side should trigger the mines. Even though I still think it's unrealistic... ;)

Share this post


Link to post
Share on other sites
Objective Flag - There is a global array that contains all the still active mines (KRON_MF_Mines). If that one is empty (count KRON_MF_Mines==0) that means they have all either exploded or been defused.

If you plan to use multiple mine fields, then it would get a bit more complicated, as all mines of all mine fields would end up in this array. But you could circumvent this by only creating one mine field at a time.

That code (count KRON_MF_Mines==0) works fine but i want more smile_o.gif

(don't know if its possible with this script)

Looks like you have "different mines" for the job,

ie, your using "Man" and "LandVehicle" mines.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nil=["a","Man",30] execVM "minefield.sqf";and<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">nil=["b","LandVehicle",10,5] execVM "minefield.sqf";

So is it possible to distinguish this (count KRON_MF_Mines==0) with more.. like (count KRON_MF_Mines01==0) and (count KRON_MF_Mines02==0) even more?

If it was possible we could have more then one objective to tick, with mines concern, instead of one.

Great job you've done smile_o.gif

edit:

I've also added the option to specify which side should trigger the mines. Even though I still think it's unrealistic... wink_o.gif

i also think its unrealistic.

i will not use that parameter for sure tounge2.gif

edit2: i have another question: will this work in MP ?

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