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
  #31  
Old 04-26-2011, 10:06 AM
robtek's Avatar
robtek robtek is offline
Approved Member
 
Join Date: Oct 2007
Posts: 1,819
Default

Thanks for the answer ZaltysZ,

the first part of my post was just wishful thinking, pointed at players which abandon a working plane so they dont have to fly home and land.

And for your second point, i think i saw part of the problems in form of fata-morgana-bomber-raids, which disappear as you come closer to them, on the syn-server.
__________________
Win 7/64 Ult.; Phenom II X6 1100T; ASUS Crosshair IV; 16 GB DDR3/1600 Corsair; ASUS EAH6950/2GB; Logitech G940 & the usual suspects
Reply With Quote
  #32  
Old 04-26-2011, 10:02 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by ZaltysZ View Post
Yes, you can disable the controls, but trimmed plane can happily fly even without working controls. What I want to say: disabling the controls does not guarantee a quick crash.
Can a script apply say full aileron before disabling controls or set engine on fire?
Reply With Quote
  #33  
Old 04-27-2011, 07:50 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

In my opinion this is what we need:

Quote:
Originally Posted by Ataros View Post

There are 2 issues with online currently:

1) when a player exits a plane AI takes control resulting in too many AI flying around at a server. There is a script to destroy AI after player exit http://forum.1cpublishing.eu/showpos...5&postcount=16
the problem with this script is that if a player exits while under attack his plane would disappear making the attacker very disappointed. Discussion is here http://forum.1cpublishing.eu/showthr...t=21518&page=3

Possible solution: damage an aircraft upon player exit to make it fall down and destroy it later in 10 minutes after it hits the ground.

2) When AI bombers are scripted to reappear on a server as time goes by the server can become very crowded with AI bombers making it unplayable. Mission example http://forum.1cpublishing.eu/showpos...8&postcount=24

The solution would be to damage AI bombers one by one (with 1-2 min intervals) in 15-25 minutes after their last waypoint. OnTaskCompleted()? Then when they fall down destroy them in 10 minutes.

Ideally damage applied to aircraft should be different (say 10 different types of damage in rotation) but deadly enough to make aircraft fall down in 1-3 minutes.
CoD possible Damage Types http://forum.1cpublishing.eu/showthread.php?t=22184 Thanks to FG28_Kodiak.

Last edited by Ataros; 04-27-2011 at 07:56 AM.
Reply With Quote
  #34  
Old 04-27-2011, 08:02 AM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

About bombers. Doesn't the problem dissappear if their last waypoint is "landing"?
Reply With Quote
  #35  
Old 04-27-2011, 08:22 AM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Default yes, but...

I would think so... But landing takes time ...

I just want them to disappear once they get back over 'friendly' areas
Reply With Quote
  #36  
Old 04-27-2011, 08:32 AM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Quote:
Originally Posted by mcler002 View Post
I just want them to disappear once they get back over 'friendly' areas
Destroy() method of AiAircraft inside OnTaskCompleted().
Reply With Quote
  #37  
Old 04-27-2011, 09:08 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by ZaltysZ View Post
Destroy() method of AiAircraft inside OnTaskCompleted().
Yes, we need someone to make this script to allow just copy-and-paste for those who does not know C# or any other language at all but makes missions in FMB like myself. Please...

This is an example of my mission that runs on Repka server atm. http://forum.1cpublishing.eu/showpos...8&postcount=24
I have no idea what I should put in the .cs file to make "Destroy() method of AiAircraft inside OnTaskCompleted(). " work. Another thing is that aircraft should fall to ground before it is destroyed with some timeout ideally as described here http://forum.1cpublishing.eu/showpos...1&postcount=33.

Last edited by Ataros; 04-27-2011 at 09:15 AM.
Reply With Quote
  #38  
Old 04-27-2011, 01:26 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

So have modified ZaltysZ script, with some damage , fastes way to ground is to disable all controlls and the engines.

Code:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class  Mission : AMission
{
	public void _DespawnEmptyPlane(AiActor actor)
	{
					if (actor == null)
						{ return;}

					Player[] Players = GamePlay.gpRemotePlayers();
					
					bool PlaneIsEmpty = true;
					
					foreach (Player i in Players)
					{	
						if ((i.Place() as AiAircraft) == (actor as AiAircraft))
							{ 
								PlaneIsEmpty = false;
								break;
							}
					}
					
					if (PlaneIsEmpty)
						{ 
							  
							  (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled);
							  (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled);
							  (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsRudderDisabled);
							  (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng0TotalFailure);
                 //for 2mots
                (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng1TotalFailure);
                
						     //wait 10min
                 Timeout(600.0, () => {	
						         (actor as AiAircraft).Destroy(); 
						     });	
							
					  }
	}

    public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceLeave(player, actor, placeIndex);
         	_DespawnEmptyPlane(actor);
    }
}
Reply With Quote
  #39  
Old 04-27-2011, 01:35 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

FG28_Kodiak, thank you so much! i will try it tonight.
Reply With Quote
  #40  
Old 04-27-2011, 02:05 PM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Guys, don't bother with engines, kill fuel pump instead (all engines should stop).

By the way, what will happen if player presses "Create" multiple time? There will probably be lots of planes on ground without working controls and engines. There is handy method IsAirborne(). If it returns false, plane should be destroyed immediately; if it returns true, only then disabling of controls should commence.

Last edited by ZaltysZ; 04-27-2011 at 02:09 PM.
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 02:37 PM.


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