Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-18-2012, 03:45 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Hi LookaLoft, Here's the script again with annotations & detailed comments that may help you get a better understanding of what some of the commands are doing. Copy/paste into Visual C# Express.

code removed by author

The int i = random.Next(1, 100 + 1); line generates a random integer between 1 & 100 (inclusive) & stores the value in the variable called i. Hence it's used to determine the "percentage" (1-100) chance of the oil fire occuring. The random integer generated needs to be less than the percent chance you specify for the variable j (int j = 10; ) for the fire object to be spawned. You could change the variable j value to 100 & an oil fire would occur every time a cargo ship was sunk (ie fire occurs 100% of the time), but I thought that might be a bit too boring so I made it just a 10% chance of a fire. I would have liked to have the fire burn for a small (random) length of time, but unfortunately there seems to be no method to de-spawn (destroy) a stationary object via script.
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE

Last edited by salmo; 10-18-2012 at 10:30 AM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.