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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2011, 08:03 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default Destroyable Static Aircraft?

Hello all, is there a way to make static aircraft destructable? I tried just putting AI aircraft on the airfields, but they take too much of a toll on performance.
Reply With Quote
  #2  
Old 06-01-2011, 08:30 AM
Longbone Longbone is offline
Approved Member
 
Join Date: Aug 2010
Posts: 49
Default

Hi mate,
as far as I know they are not real destructible (in parts)
they are only smoking and texture went black
but I believe you can despawn them,their names can be found in your xxx,mis file [Stationary]
EDIT: are you using flyable plane's? unflyable have a little bit better performance

Last edited by Longbone; 06-01-2011 at 10:00 AM.
Reply With Quote
  #3  
Old 06-02-2011, 03:59 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Hi Longbone. I'm using a combination of flyable and non-flyable aircraft. I've decided to just use static aircraft since I'm not able to get anywhere near the numbers I want with AI aircraft.

Can you elaborate more on how to despawn them? I've tried using scripts, but apparently static aircraft aren't considered AiActors so I don't know how to access them. I'm pretty good with C#, but this FMB is killing me.
Reply With Quote
  #4  
Old 06-03-2011, 12:22 AM
Longbone Longbone is offline
Approved Member
 
Join Date: Aug 2010
Posts: 49
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
Hi Longbone. I'm using a combination of flyable and non-flyable aircraft. I've decided to just use static aircraft since I'm not able to get anywhere near the numbers I want with AI aircraft.

Can you elaborate more on how to despawn them? I've tried using scripts, but apparently static aircraft aren't considered AiActors so I don't know how to access them. I'm pretty good with C#, but this FMB is killing me.
Hi Enlightened,
sorry I didn't mean static aircraft,I mean nonflyable (by human) AiAircraft.
I've made an little example mission, since I'm not an enlightened C# scripter
I hope you not get an horror it's made by an noop (me).
there is also a list for the cutlimb commands you can use

Cheers
Edit this thing (FMB) kills almost everyone
Attached Files
File Type: zip TESTCUTDESPAWN.zip (2.7 KB, 12 views)

Last edited by Longbone; 06-03-2011 at 12:29 AM.
Reply With Quote
  #5  
Old 06-03-2011, 09:36 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Thanks, Longbone. I already know how to destroy AI aircraft (in a variety of ways), but your code made me wonder if I can access the static aircraft using the gpActorByName() method. Probably not if they're not considered AiActors, but it's worth a shot. I have a mission where static aircraft are respawned after all the static aircraft at a particular airfield are destroyed, but the wreckage is still there. Over time it will just keep building up.
Reply With Quote
  #6  
Old 06-03-2011, 12:30 PM
Longbone Longbone is offline
Approved Member
 
Join Date: Aug 2010
Posts: 49
Default

Hi mate,
I think there must be a solution to access static aircraft like other static object's
gpgroundgroup,aigroundgroup etc but if so, is there a way to really despawn them or move
them to another location x0.00 y0.00 ?. If I look at other scripts they always destroy them
and then you have garbage that not dissapears.
If you destroy an AiAircraft there is sometimes garbage too, but he disappear mostly gradually
I think this is an engine fault,so i would use AiAircraft with 0gasoline and place little static
targets between them, if they not get damaged enough to despawn, do it by a script and wait for a moment
till garbage disappears,then respawn (reload) units.

I hope eventually our trouble is patched away and we get a manual for this THING!!!

Edit: is there a way to edit Strings in C# automatically
like a counter do "Bob_f_218Sqn:001" ..."Bob_f_218Sqn:002"..."Bob_f_218Sqn:003"....
as you see in my script it is made complicated a little bit
I still have a lot to learn

Cheers
Reply With Quote
  #7  
Old 06-04-2011, 01:19 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Well, I wasn't able to access static aircraft by name. I'll just have to deal with the wreckage for now.

Quote:
Originally Posted by Longbone View Post
Hi mate,
I think there must be a solution to access static aircraft like other static object's
gpgroundgroup,aigroundgroup etc but if so, is there a way to really despawn them or move
them to another location x0.00 y0.00 ?.
A lot of objects (including AI aircraft and ground vehicles) have a Destroy() method. This completely removes them, leaving nothing behind. The problem comes when we are not able to access the object and call that method.

Quote:
Originally Posted by Longbone View Post
Edit: is there a way to edit Strings in C# automatically
like a counter do "Bob_f_218Sqn:001" ..."Bob_f_218Sqn:002"..."Bob_f_218Sqn:003"....
as you see in my script it is made complicated a little bit
Yes. I would do this with a for loop. Here's an example from a mission I'm working on.

Code:
        for (int i = 1; i <= 5; i++)
        {
            DEGroundMisNums.Add(GamePlay.gpNextMissionNumber());
            string miss = DEGroundMissPath + "Ground_" + i.ToString() + ".mis";
            GamePlay.gpPostMissionLoad(miss);
        }
Here I'm loading missions, but the part we're interested in is where I build the string. I call it "miss". I already know that the missions are named Ground_1, Ground_2, etc. up to Ground_5. "DEGroundMissPath" is just a string that represents the path to where the missions are located.

As you can see, I take the path to the missions, add the name of the mission, and then use the "i" variable from the for loop to change the name of the mission each time the loop is run. I need to call the ToString() method because you can't add integers to strings. After all that, I simply tack on the ".mis" extension.

This is an easy way to do it, but you have to know (or be able to find out) the number of times to go through the for loop, and they have to be sequential. Skipping numbers would make things more complicated. I hope this helps.
Reply With Quote
  #8  
Old 06-04-2011, 04:47 PM
Longbone Longbone is offline
Approved Member
 
Join Date: Aug 2010
Posts: 49
Default

Thank you for your detailed advice.
I will test it next days ,at the moment i must do some real life event's
Have a nice day
Reply With Quote
Reply


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 07:51 PM.


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