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
  #1  
Old 05-23-2012, 10:52 PM
von Pilsner von Pilsner is offline
Approved Member
 
Join Date: Apr 2011
Posts: 377
Smile Script Help - Read damaged objects into file

I suspect this has already been accomplished, but I can not find it through Google or Forum Search so I figure I will ask here...

I have a mission.cs script that I have been using, it starts with the usual:
Code:
using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using maddox.GP;

public class Mission : maddox.game.AMission
What I would like it to do is write (append actually) to a file named 'destroyed.ini' (in the same directory as my mission) as static objects get destroyed so during the course of a mission the file may fill up like:
Code:
[Static]
Stationary.Environment.JP3_Generator_15_KW_UK1 gb 178768.08 197313.52 105.00, 2
Artillery.3_inch_20_CWT_QF_Mk_I_StandAlone2 gb 136914.39 198372.09 -60.00, 2
Stationary.Ammo_Vehicles.3inch_QF_AA_composition3_UK1 nn 136921.30 198377.00 -90.00, 2
THe coordinates are important because they will be used later to determine if it is the exact same static object that was destroyed. The suffix ',2' is just a placeholder but I would like it to end up in the file as well.

I would then like to use a separate script (my overall campaign.cs) to parse the file and use the list to not create static objects in the next mission.

I used to do C programming (command line), but the object model of C# is taking me some time to wrap my head around. If someone could help me write the objects to a file I believe I have the skills to parse the file and use the data in my own (campaign) script.

The reason I would like it in a mission script is because it is for single player use.

Thanks,
von Pilsner

p.s. - I have read through the basic tutorials and script examples so if that is all you are able to suggest, I'm doing that right now...

Last edited by von Pilsner; 05-23-2012 at 10:59 PM.
Reply With Quote
 


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 11:14 PM.


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