![]() |
#21
|
||||
|
||||
![]()
Yes, if previous one handled only despawning.
|
#22
|
||||
|
||||
![]()
I have edited my despawn script post and added additional "null" check to prevent some possible error.
|
#23
|
|||
|
|||
![]() Quote:
![]() edit : It seems there is one more "}" than needed, but works flawlessly ![]() Last edited by Jwam; 04-20-2011 at 08:12 PM. |
#24
|
|||
|
|||
![]()
More experiments with scripting. New version of Battle of France mission here http://forum.1cpublishing.eu/showpos...1&postcount=12
|
#25
|
|||
|
|||
![]()
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
![]() |
#26
|
|||
|
|||
![]()
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.
|
#27
|
|||
|
|||
![]()
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! } } } } } Last edited by Ataros; 04-26-2011 at 07:16 AM. |
#28
|
||||
|
||||
![]() Quote:
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. |
#29
|
||||
|
||||
![]()
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
![]() 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.
__________________
Win 7/64 Ult.; Phenom II X6 1100T; ASUS Crosshair IV; 16 GB DDR3/1600 Corsair; ASUS EAH6950/2GB; Logitech G940 & the usual suspects ![]() |
#30
|
||||
|
||||
![]() Quote:
![]() Quote:
![]() |
![]() |
|
|