![]() |
Players leaving aircraft before OnActorDead triggered solution
There's a simple solution to this problem.
When a player spawns into an airplane, just store that actor-player relation in a list, and on each OnActorDead in which there's no player, scan that list looking to see if there is a player "registered" to it. Simple stuff :) |
Great news! But neither did I get what the problem is about nor the solution. Maybe I will as soon as I see it but eventually it'd be better to detail it a bit further? :-P
E.g. a screenshot of the problem and for the solution? Also I believe you're using the ignore list incorrectly. You are just writing down names in your signature which doesn't ignore anyone - only provoke them and others. It'd be better to add them to your ignore list in your dashboard and delete the list from your signature. |
Had this happen a couple of times today, I really don't understand it as there are no online stats or other reason for it!
|
Problem was that, during multiplayer battles, once someone aircraft's get porked, they are hitting the silk, or simply just leave the plane to respawn before the aircraft is destroyed (hitting the ground, etc).
Because all the kill computations are made in the OnActorDead function, when that function is triggered, the player already left the plane, so it isn't in there anymore, and for the code it looks just like a regular AI plane. That way, you'll only see on server the player X killed an AI in yyy plane. To counter this, you'll have to remember the plane's id in which each player is flying at the moment the player is spawned on the server, and when an OnActorDead function is triggered as a plane is destroyed, if there's no player in it, verify plane's id in that list first, and if you find it in there, it means the registered player just left the plane before it was destroyed. So, you can throw a message on the server, saying Payer X killed player Y in yyy plane. PS: I know how to use the ignore list, and all of them are already in it. I just use that in my signature to let them know, and don't bother to write me anything, as I won't see it and won't respond to it. |
adonys, thank you for a great idea.
If you have this script ready could you share it if you do not mind? I will try asking someone to integrate it into Repka scripts. |
Don't have any script for it (as I didn't really had time to do any coding in the latest weeks). It's just an idea which came to me while I was thinking about what to do for IL2DCE persistent battlefield :)
Please feel free to use it and integrate wherever you need it. |
All times are GMT. The time now is 11:24 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.