![]() |
|
|
|
#1
|
|||
|
|||
|
Now it is coming up continuous and not stopping. how do I set a time for the message to then disappear?
|
|
#2
|
|||
|
|||
|
Code:
GamePlay.gpHUDLogCenter(null, "Only two seconds visible", new object[]{}, 2);
ups missunderstood the question: you must place the messages if used in OnTickGame in a if clause example: Code:
public override void OnTickGame()
{
base.OnTickGame();
if (Time.tickCounter() % 300 == 0) // every 10 sec.
{
// your code here
}
}
Last edited by FG28_Kodiak; 06-12-2012 at 11:25 AM. |
|
#3
|
|||
|
|||
|
public override void OnTickGame()
{ if (Time.tickCounter() % 864000 == 72000) // 864000 = 8 hour repeat, 72000 = 40 min delay. { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission5.mis"); } /////////////////////////////////////////////Player Hub and Log Info if (Time.tickCounter() % 300 == 0) // every 10 sec. { List<Player> players = new List<Player>(); if (GamePlay.gpPlayer() != null) players.Add(GamePlay.gpPlayer()); if (GamePlay.gpRemotePlayers() != null) players.AddRange(GamePlay.gpRemotePlayers()); Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray(); Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray(); if (Reds.Length > 0) { GamePlay.gpHUDLogCenter(Reds, "Cover our shipping south of Dover (AV22).", new object[] { }); GamePlay.gpLogServer(Reds, "Cover our shipping south of Dover (AV22).", new object[] { }); } if (Blues.Length > 0) { GamePlay.gpHUDLogCenter(Blues, "LW Bombers leave Calais to raid shipping at appr. 4000m! Fly a fighter sweep over AV22!", new object[] { }); GamePlay.gpLogServer(Blues, "LW Bombers leave Calais to raid shipping at appr. 4000m! Fly a fighter sweep over AV22!", new object[] { }); } } So does this look right and thanks again for the help and yes I am really trying to learn this stuff. |
|
#4
|
|||
|
|||
|
public override void OnTickGame()
{ if (Time.tickCounter() % 864000 == 72000) // 864000 = 8 hour repeat, 72000 = 40 min delay. { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission2.mis"); { List<Player> players = new List<Player>(); if (GamePlay.gpPlayer() != null) players.Add(GamePlay.gpPlayer()); if (GamePlay.gpRemotePlayers() != null) players.AddRange(GamePlay.gpRemotePlayers()); Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray(); Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray(); if(Reds.Length > 0) { GamePlay.gpHUDLogCenter(Reds, "RAF- Fly CAP between Calais and Dover", new object[]{}, 2); GamePlay.gpLogServer(Reds, "RAF- Fly CAP between Calais and Dover", new object[] { }); if(Blues.Length > 0) { GamePlay.gpHUDLogCenter(null, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[]{}, 2); GamePlay.gpLogServer(null, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { }); } } |
|
#5
|
|||
|
|||
|
Corrected:
Code:
public override void OnTickGame()
{
if (Time.tickCounter()%864000 == 72000) // 864000 = 8 hour repeat, 72000 = 40 min delay.
{
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission2.mis");
List<Player> players = new List<Player>();
if (GamePlay.gpPlayer() != null)
players.Add(GamePlay.gpPlayer());
if (GamePlay.gpRemotePlayers() != null)
players.AddRange(GamePlay.gpRemotePlayers());
Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray();
Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray();
if (Reds.Length > 0)
{
GamePlay.gpHUDLogCenter(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {}, 2);
GamePlay.gpLogServer(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {});
}
if (Blues.Length > 0)
{
GamePlay.gpHUDLogCenter(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { }, 2);
GamePlay.gpLogServer(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { });
}
}
}
|
![]() |
|
|