![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
08-14-10, 08:06 AM
|
#1 | |
|
Black Magic
![]() |
Quote:
I also didn't document that multiple scripts can be running in Automation at the same time. An Automation command in a script is defined as so: command,1,2,3,4,5,6,t where: command = name of command 1 = parameter 1 passed to the command (has to be able to convert to float value) 2 = parameter 2 passed to the command (has to be able to convert to float value) 3 = parameter 3 passed to the command 4 = parameter 4 passed to the command 5 = parameter 5 passed to the command 6 = number of times to execute. If set to 0 then there's no limit. I'll explain this one more. t = time in seconds to wait after command is given before next command is given. If 0 then the wait time will be 0.1 second. If command is the last command in the script then the wait time is ignored (it's 0) Automation contains a Loop command that does what it sounds like - loop through the section of code defined by it x times. The times to execute parameter can control how many times a certain command is executed in this looping cycle. Maybe you want a command only given once during the loop cycle. i.e.: [AS] Test_Loop [CATEGORY] Testing [COMMANDS] Set_Time_Compression,1,0,0,0,0,1,0 ; set time compression to 1 and wait 1 second before next command Rise_whole_obs_periscope,0,0,0,0,0,0,6 ; fully raise the obs scope. Wait 6 seconds before issuing next command Activate_Scope_Station,1,0,0,0,0,0,0 ; activate the obs scope Sweep_Scope,1,0,360,120.0,0,0,1 ; sweep the scope from 0 to 360 in 120 seconds. Next command will be issued 1 second after sweep is finished Lower_whole_obs_periscope,0,0,0,0,0,0,0 ; fully lower the obs scope Leave_Scope_Station,1,0,0,0,0,0,0 ; leave the obs scope Wait,0,0,0,0,0,0,600 ; wait 10 mins Loop,5,0,0,0,0,0,0 ; loop through everything 5 times [COMMANDS_END] this entire script will loop 5 times BUT the command Set_Time_Compression will only be given the first time through the loop. You can also have a Loop inside a Loop for some interesting effects Once you understand Automation and the power it brings to the game you'll see the uses for it. And Automation was needed to lay the foundation for my next big idea..... Last edited by TheDarkWraith; 08-14-10 at 08:27 AM. |
|
|
|
08-14-10, 09:36 AM
|
#2 | |
|
Grey Wolf
![]() Join Date: Feb 2009
Posts: 995
Downloads: 91
Uploads: 0
|
Quote:
![]() I looked at 2nd post at this thread, but it was not updated lately... Menage mod's option panel? New SH5 options at main menu?
__________________
![]() |
|
|
|
![]() |
| Tags |
| dbrn, favorite, new ui |
| Thread Tools | |
| Display Modes | |
|
|
