Jump to content
Sign in to follow this  
hcpookie

Nautical Mines

Recommended Posts

Beta 0.9 released! Download:

https://skydrive.live.com/?cid=5b54fc51a7917265#cid=5B54FC51A7917265&id=5B54FC51A7917265%212210

New items found under "Empty > Naval Mines and Barricades". Warning buoy has flashing light at night :)

In anticipation of Feint's diving module, I started to work on something for the divers to do! So far I've made a medium and large mine that should be a threat to any standard-sized vessel in Arma2. I finally got the trigger working thanks to Thromp's input - thanks man! :cool: The trigger spawns an ammo type that damages both SHIPS and LANDVEHICLES. So amphibious landings will have to deal with them. I suppose a helicopter could airlift them out of harm's way (with the right mods of course) but the assumption is that the mined area would be guarded with AA threats. That's where the divers come in! :D Attaching an explosive charge to the mines would be the obvious countermeasure. There is no provision to deactivate them! Since they are triggered, there would have to be some way to delete the trigger via an action menu. Is that even possible? However I don't know if it is realistic to have a deactivate switch on a mine? How do they deal with them in real life?

QUESTION: I would LOVE to be able to make them adjust their height and bob up-and-down depending on the height of the waves! Possible? There are two types of mines per size. There's a totally submerged mine that stays about 1m below surface level, and one that stays about .25 meters below surface level. The difference is that normal waves will expose the top of the normal mine, and unless you have an extremely stormy map, you won't ever see the submerged mine poke above the surface.

AI *should* never see them, or at least never see them as a threat. Keep this in mind when planning missions!

Due to the nature of the trigger I'm not sure how this will work with the big carrier mods... the vehicle center must be within 5 meters of the trigger, so it probably won't work so well with (against?) the big carrier(s).

medmine-submerged1.jpg

mines1.jpg

largemine1.jpg

largemine-submerged1.jpg

medmine1.jpg

medmine2.jpg

Edited by hcpookie

Share this post


Link to post
Share on other sites

An excellent idea which will work well with Feint's Diving Module. Good luck with it.

Share this post


Link to post
Share on other sites

Great idea, all your addon release so far have been awesome. Keep up the good work :)

Share this post


Link to post
Share on other sites

Are they a mine type, or a vehicle type that spawns ammo?

If you class them as a vehicle and have no fuel, in theory shouldn't you be able to set the waterline, and have them bob with the waves?

I have no idea how to do it, but I'm just throwing it out there...

Abs

Share this post


Link to post
Share on other sites

They are actually a SHIP type, with a trigger spawned on INIT that makes them go boom. They probably do bob up and down and I should be more clear- I want them to bob up and down from a fixed height AGL to simulate them hitting the end of the chain in waves and bob back down. I'm probably asking too much but I'm sure if I really wanted to I could script it. I guess what I really need to do is make a really stormy condition and test them in the waves. If they don't 'jump' above the waves then they are OK. The more I think about it the more I think it is probably OK and I'm just being picky :)

Share this post


Link to post
Share on other sites
They are actually a SHIP type, with a trigger spawned on INIT that makes them go boom. They probably do bob up and down and I should be more clear- I want them to bob up and down from a fixed height AGL to simulate them hitting the end of the chain in waves and bob back down. I'm probably asking too much but I'm sure if I really wanted to I could script it. I guess what I really need to do is make a really stormy condition and test them in the waves. If they don't 'jump' above the waves then they are OK. The more I think about it the more I think it is probably OK and I'm just being picky :)

your allowed to be picky, thats what addon makers do :) Keep up the great work :)

Share this post


Link to post
Share on other sites

Beta release! See first post for download.

Share this post


Link to post
Share on other sites

Very cool! I'll see if I can blow them up. :)

As for making them bob with waves, the regular buoys will bob with waves but their movement has to be "activated" by either shooting them or putting in their init "this setvelocity 0,0,-0.3. Otherwise they just sit there in place. I believe they have to have a collision model in order to react with waves. I hope this helps.

Share this post


Link to post
Share on other sites

Very cool just gave them a test.

Anyway to make a way to make them into a weapon that can be deployed and also disarmed. Could add more functionality to underwater diving if divers had to disarm them/ place them.

Share this post


Link to post
Share on other sites

Thanks for the info Feint - will have to get that set up right and add it to the INIT

Good idea Blackfox - I can make the INIT script sleep for XX seconds before creating the trigger so a minelayer ship can deploy them and get away before they arm. I have read the Real Life mines will arm hours/days after deployment. A 60-120 second delay should suffice. Any less and the minelayer may not be far enough away if they are deploying mines.

Edit - they are SHIP vehicles so I don't think they can be moved into cargo slots? Brainstorming here - a minelayer script will need to have an Action command to "createVehicle" the mines and will also need to have a counter set to deploy X number of mines. Perhaps 6 per minelayer?

HRM... need to see about making a "minelayer" pirate ship :)

Share this post


Link to post
Share on other sites

If you didn't want to go through the trouble of making a new ship, you could use the fishing boat. Then just use attachTo to attach just the mine static object to the rear of the boat. Then create an addaction (or script) that will detach the mine(s) with a negative setVelocity which will drop them into the water. Once they have been deployed or as they are being deployed, you can replace the static object with the mine that creates the trigger.

I figure, Somali pirates could get their hands on a mine, but not a minelayer. So they would use whatever boats they have available. Of course, if you want the faction to be N. Korea, they could have real minelayers...

Share this post


Link to post
Share on other sites

When I use the setVelocity command to give them "bob" they sink and eventually disappear beneath the surface. These are SHIP vehicles, just like the buoys. Which, I've noticed, will keep the velocity you give them if you bump them.

So I guess I need to make a script that constantly computes 'drift'? Any other trick to make them move up and down?

Share this post


Link to post
Share on other sites

Hi hcpookie

What are you using to "float" the mine?

GEOMETRY LOD or LANDCONTACT points?

By animating (translation) some landcontact points you should be able to animate the mine below the surface, almost any height.

The landcontact points remain on the surface and should bob with waves.

.... similar principle to my subs.

Share this post


Link to post
Share on other sites

Thanks for the mirror Foxhound!

Gnat, thanks for that suggestion. To answer your question, I'm using the GEOM lod. I think I see what you are saying about the landcontact points... if I understand correctly then it will act along the same lines as a damper animation, which seems to be a great way of making it bob. I'll have to play with that some... I will guess the animation setting will be close to the desired ordinal Z-axis measurement.

I made some mine layer boats that deploy via action- 8 mines for the medium size and 4 mines for the large size. I had to use modelToWorld since setPos doesn't really work on water. I found that modelToWorld uses the center of the model for z-axis zero. Meaning with the antennas and such above water that the mine would hover at about eye level behind the boat! Looks strange... had to use -3 for the Z-axis setting to place it correctly. But it works! :)

I will play with the bobbing animation some to see what I can figure out.

Share this post


Link to post
Share on other sites

I mean the translation simply to be something that sets the depth via User animation.

In model.cfg something like this;

		class MDepth
		{
			type="translation";
			source = "user";
			selection="LandContact1"; // actual point in LandContact LOD
			begin="TBegin"; // point in memory defining "start" point of translation animation
			end="TEnd"; // point in memory defining "end" point of translation animation
			memory = 1; 
			minValue = 0.0;
			maxValue = 1.0;
			offset0=0.0;
			offset1=10.0; // or maybe 1.0
			};

Like;

_mine1 animate ["MDepth",0.44]

If TBegin and TEnd are 1 meter apart in the vertical, this might move the mine to 4.4 meters depth.

Sure, you could make a script that constantly changes that depth to make them *look* like they are bobing with waves ..... but simply using Landcontact points should mean they WILL bob with waves.

Maybe just 1 single landcontact point is enough. More than one might cause them to "wobble" as well as bob.

As for attaching mines to boats, use this instead. the brackets are [x,y,z] position of mine relative to center of ship

_mine3 attachTo [_ship,[0,0,2]];

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

I'm reading you Gnat - I was just putting the pieces together in my mind :) Thanks so much for the suggestion - it worked! :cool:

SO - They now bob up and down! Turns out you need more than 1 point in the LandContact LOD. I put in 4 points named "bob_top" and have a bone named the same. Also named 1 point in each view LOD "bob_top" just to be sure everything is in sync... not sure if this part is needed, but it worked for me. I also have a "bob_top" and "bob_bottom" memory point for the transition.

Also, I did find out that you also need a non-zero Mass value in the GEO lod. Previously with ZERO Mass, they would float at the LOD centerline (0,0,0) - but of course would not bob. Adding 0.01 Mass to the very top point, they now bob up and down depending on the level of the waves.

So here's the issue - they now stay submerged below the surface by about 1 meter. The nice thing about the previously used ZERO Mass is that the tips of the probes would stick out above the waves. So I now I will see if I can animate them up with that Transition animation, so that they can float up higher and still bob. I believe this should work.

QUESTION - can I pass a random value to the animation? That would be *perfect* because it would completely randomize the level below the surface they will float and bob! So instead of the INIT script doing "this animate ["float", 1], it could "animate ["float", _x]" ...where _x is the random amount. Can you pass variables into an animation like that? I know there's a random function... need to read up on that.

Share this post


Link to post
Share on other sites

Hello hcpookie,

i wanna thank you at first for creating this addon, because it offers a lot of ideas for a mission.

I was engaged in this projekt nearly 2hours and it´s amazing...for that reason i wrote a preview

at the forum of www.arma2base.de to push it to the german ArmA-community.

Thanks alot for the outstanding work!

Best regards

McLupo

Share this post


Link to post
Share on other sites

@hcpookie - wasn't the idea with this type of mine that they would have a chain length specifically designed to allow them to hang just below the surface anyway?

Share this post


Link to post
Share on other sites

Update - I got the mines sorted. The bobbing mines are "standard" and the adjustable mines can be set deeper for anti-submarine nets ;)

The minelayer boats work perfectly - to make sure the boats work and don't throw dependency errors, I'm combining this into the pook_PBR ship addon. SO... the "official" v1.0 download of the mines is included in the v1.3 PBR ships update I just uploaded. See the pook_PBR ships thread for further updates:

http://forums.bistudio.com/showthread.php?130623-PBR-Boat-Pack

Enjoy! :cool:

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×