![]() |
Maybe something like this would work?
Code:
(actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng0TotalFailure); |
At my Testmission FuelPumpFailure works without a problem. So i dont know what's going wrong.
|
1 Attachment(s)
@Kodiak, nö, dann hätte er ja Fehlermeldungen rausgespuckt. I just get the usual "Object not set to a reference" messages as before, nothing unusual...
Does the script recognize that the player just spawned and wants to change the airfield, so didn´t even takeoff? Will the player get a penalty then also? I attached the script below. I have also the "plane-destroy-after-abandoming" script running, so I have troubles with calling up the "OnPlayerLeave" parts twice. |
No the script uses Aircraft.IsAirborne, if true the plane is in the Air, if false the plane is on ground. But this works only again in the Beta Patch and then i hope so forever after the next reqular patch. ;)
I will take a look at your script. At the moment i work on your Death penalty -> Brzzzzlll ;) and on the Arrest Count Down. |
Nice! :)
If you need further infos let me know, I`ve got access to our server, but not the game installed on my notebook. |
New Version, added Player Countdown, changed Player in Prisoncell from object refence to Playername, so the penalty should be still active, even the player reconnected.
Code:
using System; |
Thanks, I try now to load that script via submission and currently running on our server.
If someone is able to test, please report back... ;) |
So another Script, Player Plane Memory function. ;)
actual its a early 'alpha' it's shows the playername after shootdown, even if the enemy player leaved the plane via esc or bailed out. then a short message will shown playername1 shoot down by playername2. the message is only shown if a human shoot down a human, the others are in work. Knows anybody how to disable the gamemessages in chat or override them? I actually hoped we get this possibility with the beta patch, so we can change the game messages against our own messages, but i don't find anything. But i look deeper in it ;) Code:
using System; |
Allright, I just put these 2 scripst 1to1 into an empty submissions and load them into the main mission via mainscript.
Concerning your penalty script: Message and countdown works fine, only the fuelpump is still operable after penalty. I am now trying different damage types, will report back. I added the other damagetypes as you see below, but they all are ignored, I just can take off as usual. . . . if (ArrestTime.TotalSeconds < TotalArrestTime) { TimeSpan RestTime = pri.ArrestEndTime.Subtract(DateTime.Now); GamePlay.gpLogServer(null, "Player: {0} gets a time penalty for leaving Airplane in flight\n", new object[] { player.Name() }); (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.FuelPumpFailure); (actor as AiAircraft).hitNamed (part.NamedDamageTypes.FuelTank0Exploded); (actor as AiAircraft).hitNamed (part.NamedDamageTypes.Eng0TotalSeizure); } . . . PS: Tested the script also on an empty mission, without any other script with the same results... no penalty. ;( |
Are the player planes created in Submission or Mainmission?
|
All times are GMT. The time now is 05:36 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.