View Single Post
Old 05-19-06, 09:09 AM   #5
Mcfester
Swabbie
 
Join Date: Nov 2005
Location: Thailand
Posts: 5
Downloads: 0
Uploads: 0
Default Re: How to script sub movement?

Quote:
Originally Posted by lancer
Goodaye,

Yep, scripting the submarine movement is what I'm aiming at but how do you set up suitable triggers that randomly activate a depth or speed change?

I can see no 'random' function in the doctrine or scripting languages. There is a 'do on the x occurence of a trigger' function but how you would use this and not get whacko behaviour is beyond me. Anyone with answers would be appreciated.

Cheers,
Lancer
Games starts at 12 noon
Sub 1 at 600ft
Apply Script 1 to sub 1, make depth 1500ft for 300secs
Automactic event trigger 1 applied to ALL, start time 00:12:10, finish time 00:12:11, action run script 1.
10 mins into game sub goes to 1500ft for 5 mins then returns to 600ft, do as many as these as you like.
If you use doctrine in the trigger you can run a script to change depth or speed if it is detected by yourself or comes within set range of yourself, or even get him to attack you.
Best way to change course is set tactic as random box, a long rectangle works best, when sub reaches edge of box he changes crs.
Mcfester is offline   Reply With Quote