SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH4 Mission Designers' Forum (https://www.subsim.com/radioroom/forumdisplay.php?f=222)
-   -   Target intercept, TDC Training Mission. (https://www.subsim.com/radioroom/showthread.php?t=248960)

Pilot_76 03-23-2021 09:44 PM

Target intercept, TDC Training Mission.
 
Hi skippers,

This has been posted a while ago by me, and I'd like to give it a shot again.

I want to design a TDC training mission and once the mission starts a random ship will show up in a random position and within X distance from Ownship (our Sub) following a random waypoint.

How to design in such a way that the mission will choose a single ship from a list? My guess is that if I assign a percentage chance from a lot of units the game will spawn many units each one with its own percentage. So I will end up with many ships at once. I want just one from a list.

KaleunMarco 03-24-2021 12:22 AM

Quote:

Originally Posted by Pilot_76 (Post 2738299)
Hi skippers,

This has been posted a while ago by me, and I'd like to give it a shot again.

I want to design a TDC training mission and once the mission starts a random ship will show up in a random position and within X distance from Ownship (our Sub) following a random waypoint.

How to design in such a way that the mission will choose a single ship from a list? My guess is that if I assign a percentage chance from a lot of units the game will spawn many units each one with its own percentage. So I will end up with many ships at once. I want just one from a list.

i believe you will have to build a GROUP (RGG) and use the parameter that will limit the Maximum number of ships spawned.

so you create a Group, add various ships with spawn percentages, then set the Max parameter to one.

i am not sure what would happen if the percentages worked against you and zero ships were spawned.

anyway, that's how i would do what you are trying to do.

good luck.

:Kaleun_Salute:

Pilot_76 03-24-2021 12:33 AM

tks Marco,

Good idea on the "group" subject. Haven't thought about it.:salute:

propbeanie 03-24-2021 12:36 PM

An RGG though, always has a "boss" ship that all others follow, so it will always spawn at 100%. In the RGG though, you can have it listed as GENERIC Merchant, or GENERIC Tanker or whatever class. As for where it spawns, where you place the RGG is the "center" point, but you can use the "RandStartRadius=" line (which defaults to "0.000000") to have it spawn anywhere inside of the radius of that figure. However, the group will always head toward waypoint 1. You can set "loop" points though, for the ship to choose a variety of different possible routes after Waypoint 1 is reached, which might be a bit easier to have variety. The player always starts in one single defined spot inside a Single Mission, and the RGG always spawns with a given radius of a defined location, but after that, with the use of "Loop" at the different waypoints, you can have all kinds of "chance" fun. The player's boat has to be at least 30+km away from where the group spawns, so that should give you plenty of chance encounter to deal with... :salute:


All times are GMT -5. The time now is 06:05 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 1995- 2021 Subsim®
"Subsim" is a registered trademark, all rights reserved.