Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

HOWTO: Setting Battery Level

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DW Mission Designers' Forum
View previous topic :: View next topic  
Author Message
laglos



Joined: 13 Jan 2005
Posts: 220
Location: Virginia, USA

PostPosted: Thu Mar 17, 2005 8:48 pm    Post subject: HOWTO: Setting Battery Level Reply with quote

I'm posting this because I've seen several people asking about it, so in the hopes that in the future at least a few will try the search function and thus find their answer. Smile

Here's a step by step guide for setting the battery level of a sub when creating your own mission:


  1. Create a DrainBattery script

    1. Click on the Add Script button (lower right corner; looks like a movie clapper).
    2. Set Apply To ALL
    3. Set the name of the script to something like "DrainBatteryS"
    4. Go to page 2 of the script panels
    5. In the #1 box, select "SetBattery" from the pulldown. Two other windows will appear. In the first, select the object you wish to drain the battery of. In the second, enter the percentage you wish the battery level to be.

  2. Create a DrainBattery trigger

    1. Click on the Add Trigger button (lower right; looks like an arrow pointing to an X). Then click on the map somewhere to "place" the trigger (doesn't matter where....pick somewhere where it'll be out of the way)
    2. Select Apply to ALL
    3. Give the trigger a name, i.e. "DrainBatteryT".
    4. Set the type to "Event trigger"
    5. Set the activation to "Automatic"
    6. Enter a short description of this trigger if desired (i.e. "Trigger which runs the DrainBatteryS script at the beginning of the mission).
    7. Don't select "Can Refire".
    8. Skip page 2; the defaults are fine. (don't need Doctrine Lang; start and end times and duration should be all zeros)
    9. If you want to inform the player, set the stuff on page 3 at your whim. Otherwise, skip to page 4.
    10. On page 4, set the Action to "Run Script", and, in the pulldown that appears, select the script you created in part #1 above.


And you're all done! There's other interesting things you can do by fooling with the Apply To settings and by using the Doctrine Language in the trigger to apply other tests, or by fiddling with the start time of the trigger, but this should get you started in the wonderful world of triggers and scripts. Smile Enjoy!
Back to top
View user's profile Send private message Visit poster's website
cdt roland



Joined: 27 Mar 2002
Posts: 47
Location: Paris, France

PostPosted: Fri Mar 18, 2005 3:29 am    Post subject: Reply with quote

tkx Laglos, very usefull!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DW Mission Designers' Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group