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)
-   -   If unit destroyed (https://www.subsim.com/radioroom/showthread.php?t=236866)

Imarider 03-09-18 07:41 PM

If unit destroyed
 
If i have some unit in campaign in one of the .mis files (UKHarbourTraffic.mis in OM for example) and it's destroyed and i make the event with trigger to spawn this unit (destroyer), i mean if i kill the Destroyer and make this event, it will be spawned immediately, in this patrol, or in next patrol? I want that it spawn in next patrol, will it work? Or just the game load this .mis file in next patrol with the same ships that added to this .mis file in editor? If i can't to spawn destroyed unit in next patrol (not in the same when it's destroyed) this way, is there are possible to do it another way or what i have to do else? At least this will not cause CTD?

propbeanie 03-10-18 09:07 AM

If you open that particular file in a text editor, you'll see lines like "DelayMin=1", "DelayMinInterv=8635" and "SpawnProbability=70". This particular example from one of my files means that the RGG (Random Generated Group) will spawn with a one minute delay every eight thousand six hundred thirty-five minutes, but at a seventy percent rate, or 7 in 10 times. In SH4MissionEditor, you do not see that "DelayMin=1" setting, and the "DelayMinInterv=8635" is actually listed in hours, or 143.91666_ hours, in this case. Further down in the text will be something similar to "MaxInst=50", which means, for this particular example, that the RGG will generate 50 time maximum in this cycle (file lifetime), irrelevant of the other three settings above. If it hits 50 prior to the end of the file cycle, it quits generating the RGG. There is also a "MaxUnitsCreated=20" setting, which means that each spawning of the RGG can have a maximum of 20 ships. You'll see "default" values for those for 10000 and 100 in the stock game. Most would be on the order of 100 and 1. They all work together though, for when to spawn the RGG (Random Generated Groups).

In other words, if an RGG is set to spawn more than once ("MaxInst=" line), and you've destroyed the one in-game at this time, when the next spawn cycle comes due (the "DelayMinInterv=" line), then it will spawn another vessel in that same spot. By the same token (and lurker worked very hard on this portion of his mods), if the spawn rate is set too high, and the game attempts to generate another "new" unit where the first is, you will often end up with overlapping spawned units, which can look very strange, sometimes resulting in explosions and fires, when the ships' collision detection kicks in... :salute:


All times are GMT -5. The time now is 02:43 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.