Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Online War - FMB scripting (http://forum.fulqrumpublishing.com/showthread.php?t=21518)

ZaltysZ 04-20-2011 05:02 AM

Quote:

Originally Posted by Thee_oddball (Post 268371)
thank you Zalty does this replace the original script?

Yes, if previous one handled only despawning.

ZaltysZ 04-20-2011 06:27 PM

I have edited my despawn script post and added additional "null" check to prevent some possible error.

Jwam 04-20-2011 07:23 PM

Quote:

Originally Posted by ZaltysZ (Post 269094)
I have edited my despawn script post and added additional "null" check to prevent some possible error.

Cool thank you very much ! I'll use it :)

edit : It seems there is one more "}" than needed, but works flawlessly :)

Ataros 04-25-2011 09:52 PM

More experiments with scripting. New version of Battle of France mission here http://forum.1cpublishing.eu/showpos...1&postcount=12

LeadFarmer 04-26-2011 01:58 AM

bottom of that script says timeout 1 which is one sec. set that to 60 and your planes will despawn after 60 sec which is enough time for an aircraft to hit the ground when you bail and despwan ;)

Ralith 04-26-2011 05:29 AM

Won't that leave the AI in control for 60 seconds, rather than having it glide into the ground? Really, the code should be ran instantly, and it should disable AI control instead of simply removing the aircraft--assuming that's currently possible.

Ataros 04-26-2011 07:12 AM

This sample script made for fun disables player controls. Maybe someone can use it to disable AI controls for say 10 minutes before destroying AI

Code:

using System;
 using maddox.game;
 using maddox.game.world;

    public class Mission: maddox.game.AMission
    {
          / / Override the method that is invoked when some of the planes will take off ...
        public override void OnAircraftTookOff (int missionNumber, string shortName, AiAircraft aircraft)
        {
            base.OnAircraftTookOff (missionNumber, shortName, aircraft); / / call the base method (you never know ...)
            if (GamePlay.gpPlayer ()! = null) / / check if we have a player.
            {
                if (GamePlay.gpPlayer (). Place ()! = null) / / check that the player is sitting somewhere and not hanging out on the rag.
                {
                    if (aircraft.Name (). Equals (GamePlay.gpPlayer (). Place (). Name ())) / / if the plane took off - a player, then ...
                    {
                        aircraft.hitNamed (part.NamedDamageTypes.ControlsElevatorDisabled); / / ... disables  elevators ...
                        aircraft.hitNamed (part.NamedDamageTypes.ControlsAileronsDisabled); / / ...  aileron ...
                        aircraft.hitNamed (part.NamedDamageTypes.ControlsRudderDisabled); / / ...  rudder.
                                                / / Have a nice flight!
                    }
                }
            }
        }     
    }

More scripts here http://translate.google.com/translat...hp%3Ft%3D68369

ZaltysZ 04-26-2011 08:09 AM

Quote:

Originally Posted by Ralith (Post 273490)
Won't that leave the AI in control for 60 seconds, rather than having it glide into the ground? Really, the code should be ran instantly, and it should disable AI control instead of simply removing the aircraft--assuming that's currently possible.

The aim is not to make how it should look in real life. The aim is to remove clutter at first and then make the best you can with realism, because piles of planes have huge impact on playability.

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.

Extending despawn timeout can lead to great clutter, i.e. when player presses "Create" multiple times.

robtek 04-26-2011 08:38 AM

The aim should be, imho, when a player bails from a working plane and he tries to create a new plane, he find himself in that "abandoned" plane, as long as it is still flying :-D
And from a realism point of view, it is realistic that planes with dead crews were hunted and so live planes could escape.
I dont think that happens so often to have a felt influence on playability.

ZaltysZ 04-26-2011 09:11 AM

Quote:

Originally Posted by robtek (Post 273561)
The aim should be, imho, when a player bails from a working plane and he tries to create a new plane, he find himself in that "abandoned" plane, as long as it is still flying :-D

You mean injection after ejection? :o I don't think game engine allows you to teleport a crew member into plane. You can force a player posses a virtual crew member, but at first there should be something to posses in cockpit.

Quote:

Originally Posted by robtek (Post 273561)
And from a realism point of view, it is realistic that planes with dead crews were hunted and so live planes could escape.
I dont think that happens so often to have a felt influence on playability.

In fact, the problem isn't flying Dutchmen alone. The problem is bigger. All despawning logic isn't so trivial and implementation can become very complex. The more I play in MP, the more pitfalls I see. :mad:


All times are GMT. The time now is 06:48 AM.

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