| View previous topic :: View next topic |
| Author |
Message |
laglos
Joined: 13 Jan 2005 Posts: 220 Location: Virginia, USA
|
Posted: Thu Mar 17, 2005 8:48 pm Post subject: HOWTO: Setting Battery Level |
|
|
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.
Here's a step by step guide for setting the battery level of a sub when creating your own mission:
- Create a DrainBattery script
- Click on the Add Script button (lower right corner; looks like a movie clapper).
- Set Apply To ALL
- Set the name of the script to something like "DrainBatteryS"
- Go to page 2 of the script panels
- 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.
- Create a DrainBattery trigger
- 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)
- Select Apply to ALL
- Give the trigger a name, i.e. "DrainBatteryT".
- Set the type to "Event trigger"
- Set the activation to "Automatic"
- Enter a short description of this trigger if desired (i.e. "Trigger which runs the DrainBatteryS script at the beginning of the mission).
- Don't select "Can Refire".
- Skip page 2; the defaults are fine. (don't need Doctrine Lang; start and end times and duration should be all zeros)
- If you want to inform the player, set the stuff on page 3 at your whim. Otherwise, skip to page 4.
- 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. Enjoy! |
|
| Back to top |
|
 |
cdt roland
Joined: 27 Mar 2002 Posts: 47 Location: Paris, France
|
Posted: Fri Mar 18, 2005 3:29 am Post subject: |
|
|
| tkx Laglos, very usefull! |
|
| Back to top |
|
 |
|
|
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
|