Сообщение от
41Sqn_Banks
Unfortunately not, only one user label is drawn that has the actor.Name as text. The labels to a specific player or army are not drawn
Script is running on a dedicated server, player is a remote client.
It was a single-mission sample, i tryed step by step check , but now it seems like i know what is the problem:. In multiplayer label will not sent to player which is author of this label - just to not doubling labels, exept case when labels sent to everybody. So, when you use that code you make label with player who enter the plane as author, sever will not send it to this player. But You can change the author of label, then it would be send to remote player, server is good candidate to be author(couse hi makes it really) like this :
Код:
using maddox.game;
using maddox.game.world;
using maddox.GP;
using System.Collections.Generic;
using Math = System.Math;
public class Mission : AMission
{
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceEnter(player, actor, placeIndex);
Point2d p ;
p.x = actor.Pos().x;
p.y = actor.Pos().y;
GPUserLabel ul = GamePlay.gpMakeUserLabel(p, GamePlay.gpPlayer(), actor.Name(), GamePlay.gpTimeofDay(), (int)GPUserIconType.Plane);
GamePlay.gpDrawUserLabel(ul);
p.x -= 300;
ul.pos = p;
ul.Text = "Show player";
GamePlay.gpDrawUserLabel(new Player[] { player }, ul);
p.x += 600;
p.y += 300;
ul.pos = p;
ul.Text = "Show army";
GamePlay.gpDrawUserLabel(0,ul);
p.x += 300;
p.y += 300;
ul.pos = p;
GamePlay.gpDrawUserLabel(1, ul);
p.x += 300;
p.y += 300;
ul.pos = p;
GamePlay.gpDrawUserLabel(2, ul);
}
}
it should draw 3 labels - actor.Name, Show player and Show army , try it please.
--- Добавлено ---
Сообщение от
=HH=Pauk
podvoxx, выручай, надежда на тебя, никто не может помочь в вопросе посадки гидросамолетов на воду... хотя в условиях задано.
увы, похоже никак
--- Добавлено ---
Сообщение от
Ph0b0s
Вопрос,
как определить было ли попадание по самолету одним игроком в другого?
Появилась идея, немного повысить комфортность полетов на дуэльном сервере, а именно: выводить надпись игроку при нажатии Alt+F2 "Самолет противника уничтожен", который ранее подстрелил своего соперника, как это было в старом ИЛе при нажатии новой попытки, либо после полного уничтожения самолета.
есть событие на повреждение самолёта -
Код:
public override void OnActorDamaged(int missionNumber, string shortName, AiActor actor, AiDamageInitiator initiator, part.NamedDamageTypes damageType)
{
base.OnActorDamaged(missionNumber, shortName, actor, initiator, damageType);
}
в нём как аргумент идёт initiator - это кто подбил и damageType - что подбили, можно запоминать и при выходе писать игроку.