CCIP-subsim
Posts: 695
Joined: 11/10/2015 Status: offline
|
I still need to look into this - I wanted to mess with sub behaviour scripting a bit, mainly for out-of-contact logic, but it would be good to get them to switch things around a bit more. It's not actually too difficult to get them to vary though - if you just want a sub to take random depth at regular intervals, it could be just a couple of lines. Create 4 points covering the sub's entire operations area for the scenario, then create a "unit remains in area" trigger for that submarine and, say, make it trigger after every hour. Then create an event that will be activated by that trigger, and for action, you just create a Lua script that says: math.randomseed(os.time()) local subdepth = math.random(100,1000) ScenEdit_SetUnit({side='yourside', unitname='yoursubmarine', manualAlitude='true', moveto=0-subdepth}) (with the name of your side and submarine changed, obviously) Can't test it right now, but I think that should work! Then you can play around with it, of course, by creating different trigger areas and/or only triggering changes less than 100% of the time, etc.
|