SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop > DW Mission Designers' Forum
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-04-10, 03:56 PM   #1
ADM Mako
Swabbie
 
Join Date: Mar 2002
Location: 2 1/2 mi East KTUP
Posts: 9
Downloads: 6
Uploads: 0
Default Random ship / group spawn

I've got a question and haven't been successful in searching for a solution here, and the manual doesn't really cover this well enough.

I have a scenario I'm working on where I want several groups of ships, subs, and biologics to randomly spawn... but in a logical "if/then"manner.

For example, I have a single attack boat as GP1 (25% POI), an attack sub and a missile boat as GP2 (50% POI), and a diesel boat as GP3 (75% POI).

What I want to happen is that only one of the groups actually spawns, but which one actually does is randomized kinda like this :

IF GP1 exist GOTO END
ELSE
IF GP2 exist GOTO END
Else
Spawn GP3
END

(I hope that makes sense)

Is this possible within the scope of the script editor? Or is there another method to accomplish this?
__________________
ADM Mako
ADM Mako is offline   Reply With Quote
Old 03-04-10, 04:10 PM   #2
goldorak
Admiral
 
Join Date: Apr 2005
Posts: 2,320
Downloads: 0
Uploads: 0
Default

You have to use dynamic groups. An example is given at the end of the mission editor manual. You'll find it in the Dangerous Waters\manual folder.
goldorak is offline   Reply With Quote
Old 03-04-10, 10:43 PM   #3
Molon Labe
Silent Hunter
 
Join Date: Jun 2004
Location: Along the Watchtower
Posts: 3,810
Downloads: 27
Uploads: 5
Default

Goldorak's got you on the right road.

You'll want to next Dynamic Groups (DG's) inside a master DG. So you'll have a master DG that has 3 objects in it, and you'll select a maximum of 1 of those 3 objects to spawn. Then you have 3 DGs inside the master, each with their own objects inside them and at the PI's you've indicated. The master spawns one of those three groups, and when that group spawns it will spawn whatever is inside it.
__________________
Molon Labe is offline   Reply With Quote
Old 03-05-10, 09:25 AM   #4
ADM Mako
Swabbie
 
Join Date: Mar 2002
Location: 2 1/2 mi East KTUP
Posts: 9
Downloads: 6
Uploads: 0
Default

Ok great - thanks guys.

I must have missed that part of the manual, probably didn't read closely enough. Was just skimming through it looking for anything that jumped out at me.
__________________
ADM Mako
ADM Mako is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:17 AM.


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