PDA

View Full Version : Random submarine movement


lancer
04-20-06, 02:42 AM
Goodaye,

I'm trying to set up a simple scenario which has one hostile sub, randomly placed in an area. The sub moves through the area at random in order to provide some basic stalking and TMA practice for myself.

The tricky bit that is causing me trouble is how to make the sub change depth / speed at occasional, random intervals. I can do this - more or less - with waypoint forced changes or by creating multiple instances (say ten or more) of the same sub but with different tactics, waypoints etc. None of these solutions are ideal as the scenario is geared for my own use and I'd prefer to have a target that exhibits more random and unpredictable behaviour. Eg. something that I can't reverse engineer just because I designed the scenario.

If there is anyone who has a more elegant solution than the standard stuff I've mentioned above then I'm both appreciative and all ears.

Cheers,
Lancer

Kapitan
04-20-06, 08:28 AM
You need to script the submarines movements and also set random start points.

Speak to bellman or TLAM strike they can help you more than me.

Fish
04-20-06, 02:01 PM
Goodaye,

I'm trying to set up a simple scenario which has one hostile sub, randomly placed in an area. The sub moves through the area at random in order to provide some basic stalking and TMA practice for myself.

The tricky bit that is causing me trouble is how to make the sub change depth / speed at occasional, random intervals. I can do this - more or less - with waypoint forced changes or by creating multiple instances (say ten or more) of the same sub but with different tactics, waypoints etc. None of these solutions are ideal as the scenario is geared for my own use and I'd prefer to have a target that exhibits more random and unpredictable behaviour. Eg. something that I can't reverse engineer just because I designed the scenario.

If there is anyone who has a more elegant solution than the standard stuff I've mentioned above then I'm both appreciative and all ears.

Cheers,
Lancer
Changing tactic at waypoints doesn't work, I hope Sonalysts will fix that.
I did some thing as you want for TMA practice.
Changing speed, course and depth at waypoints works fine.
I used five subs, put them in a dynamic group so just one exist at game start.
Works for me, because I have a worse memory. :) Altough I don't think many people can remember all the movements the sub are designed to do.

lancer
04-21-06, 04:18 AM
Goodaye,

Yep, scripting the submarine movement is what I'm aiming at but how do you set up suitable triggers that randomly activate a depth or speed change?

I can see no 'random' function in the doctrine or scripting languages. There is a 'do on the x occurence of a trigger' function but how you would use this and not get whacko behaviour is beyond me. Anyone with answers would be appreciated.

Cheers,
Lancer

Mcfester
05-19-06, 09:09 AM
Goodaye,

Yep, scripting the submarine movement is what I'm aiming at but how do you set up suitable triggers that randomly activate a depth or speed change?

I can see no 'random' function in the doctrine or scripting languages. There is a 'do on the x occurence of a trigger' function but how you would use this and not get whacko behaviour is beyond me. Anyone with answers would be appreciated.

Cheers,
Lancer

Games starts at 12 noon
Sub 1 at 600ft
Apply Script 1 to sub 1, make depth 1500ft for 300secs
Automactic event trigger 1 applied to ALL, start time 00:12:10, finish time 00:12:11, action run script 1.
10 mins into game sub goes to 1500ft for 5 mins then returns to 600ft, do as many as these as you like.
If you use doctrine in the trigger you can run a script to change depth or speed if it is detected by yourself or comes within set range of yourself, or even get him to attack you.
Best way to change course is set tactic as random box, a long rectangle works best, when sub reaches edge of box he changes crs.

lancer
05-20-06, 12:06 AM
Goodaye,

Thanks for the info. Much appreciated.

I'm still unclear as to how to make it random. Eg. if games starts at 12 noon how can I script it such that the AI sub changes depth at Random times thereafter, not just at the specific times that I have scripted for.

Additionally if a depth change is triggered at a random time how could I script it such that there is a 50% chance the sub goes above the layer (say 100ft) and a 50% chance that the sub goes deep (say 1500ft). Eg. a random depth change.

Cheers,
Lancer

MaHuJa
05-20-06, 10:34 AM
...such that the AI sub changes depth at Random times ... such that there is a 50% chance the sub goes above the layer (say 100ft) and a 50% chance that the sub goes deep (say 1500ft) ...

1: "Random Timing Whale"
Whale, transit tactic with at least one waypoint, thin random start box along the transit path, attach a destination trigger. Taking note of the speeds/distances you can specify the min/max times before the trigger triggers.

2: Use several, triggering different depth scripts.

OKO
05-22-06, 09:22 PM
One other solution, not so bad =>

1) using a random box
2) using barrier tactic
3) put a 5 or 7 miles tolerance to the barrier WP

why barrier ? because during the barrier, the sub will periodically come back to the link, to send or receive data.
This period is very variable, sometimes 30 minutes, sometimes 1h30 ... it's just never the same.
So the sub will stay at the desired depth, and sometimes will move up just under the surface, using antenna or floating wire to come on the link for 5 to 10 minutes, then will go back to his assigned depth.
With the random box (or dynamic locations, even better) and the tolerance, you couldn't know where the sub will spawn neither what will be his exact course (you could have 45° or even 90° of incertaincy if you want, just increase the tolerance or reduce the WP distance).

If you also create random depths change during the mission (using whales as said MaHuJa), random initial depth (using 3 dynamic group at mission start for 3 different depth, it's really easy) and speed (as easy), you could have quite a large number of differents barrier patrols with only one programmed sub.

here is a example of scenario with random speed and depth

=> http://okof4.free.fr/missions/DW/MP4_Diesel_slick_v1.02.mu

the HAN and the XIA are scripted to have random speed (4 differents, but same for XIA and HAN) and random depth (3 differents, XAI and HAN independent) at mission start.
this give you 36 different configurations !
With only quite a few work (only 4 scripts for speed, 6 scripts for depth), very easy to elaborate and quickly built (30 second each), and some dynamic groups to make it random.


It's often better to script a single sub than to use many different subs when you need to assign triggers to this sub (destination / kill etc ...).
It save LOTS of working time, for a more random choice than just creating different "static" (I mean not using random settings) subs.

lancer
05-22-06, 11:07 PM
Goodaye,

I'm starting to get the hang of it. Thanks for all the good info!

Cheers,
Lancer