![]() |
|
#1
|
||||
|
||||
![]()
hey Kodiak, i tried your script, and it seems to work...
i put it into my mission, and adjusted the names of the spawnareas in the script, as well as the messages which pop up.everything works like a treat, even with more waypoints on one side! thank you very much, i think for now, this is perfect for my use....although if you have spare time and if you are in the mood, then i would really appreciate, if you could inlcude all my wishes from my above post,.....one day. Edit: now that i have my big yellow messages, i wonder how it is possible, to change the server messages.... i saw on some servers, that the normal messages like "AI SpitfireIa has been destroyed by...."(the small white ones, which appear if you killed someone or get killed) were adjusted..i dont know anymore on which server i saw this, but there the server was stating something like "...JG26_DavidRed kicked Ki SpitfireIa in the ass...." i will probably not use this phrase, but i think something more funny could be added than the default phrase... Last edited by David198502; 06-21-2012 at 08:52 AM. |
#2
|
||||
|
||||
![]()
thx Kodiak again for your limitbirthplace script...works great even with more spawnpoints on one side...
the only thing now is, that if i have more than one spawnpoint on one side, then the message, warining that only 5planes are left on the one side, is dependent on each spawnpoint, and not on the total number of planes available on one side.... i would like to keep the messages, warning that one spawnpoint has only x planes left, but would like to have the message included, warning the team, if the total number of available planes is left to 5.... |
#3
|
|||
|
|||
![]()
Change OnPlaceEnter to:
Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) { base.OnPlaceEnter(player, actor, placeIndex); AiBirthPlace birthPlace = GetBirthplace(actor); AiCart cart = actor as AiCart; if(cart != null) AvailablePlanes.ForEach(place => { if (place.BirthPlace == birthPlace.Name()) { place.NumberOfPlanes--; int numberOfAllAvailablePlanes = CountAvailablePlanes(actor.Army()); if (numberOfAllAvailablePlanes == 5) { if(actor.Army() == 1) GamePlay.gpHUDLogCenter(null, "Attention Reds only {0} Planes are left", new object[] { numberOfAllAvailablePlanes }); if(actor.Army() == 2) GamePlay.gpHUDLogCenter(null, "Attention Blues only {0} Planes are left", new object[] { numberOfAllAvailablePlanes }); } if (place.NumberOfPlanes == 0) { GamePlay.gpHUDLogCenter(null, "Attention {0} is no longer available", new object[]{place.BirthPlace}); birthPlace.destroy(); } } }); } Last edited by FG28_Kodiak; 06-21-2012 at 12:06 PM. |
#4
|
||||
|
||||
![]()
ah ok....werds gleich ausprobieren!
|
#5
|
|||
|
|||
![]()
Hm forgotten i am on an english speaking forum
![]() |
#6
|
||||
|
||||
![]()
mhh me as well
![]() ok this works, but then the message, warning that only x planes are left for a certain spawnpoint is gone....so i added this, assuming that i can get both messages to pop up, the one warning that a spawnpoint is short on planes, and the one warning the team that it has only 5planes left in total...but this seems to not work...the message warning the team that only 5planes in total are left, is not popping up...unfortunately...i almost thought, that at least once i could sort a problem out for myself ![]() HTML Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) { base.OnPlaceEnter(player, actor, placeIndex); AiBirthPlace birthPlace = GetBirthplace(actor); AiCart cart = actor as AiCart; if(cart != null) AvailablePlanes.ForEach(place => { if (place.BirthPlace == birthPlace.Name()) { place.NumberOfPlanes--; int numberOfAllAvailablePlanes = CountAvailablePlanes(actor.Army()); if (numberOfAllAvailablePlanes == 5) { if(actor.Army() == 1) GamePlay.gpHUDLogCenter(null, "Attention Reds only {0} Planes are left", new object[] { numberOfAllAvailablePlanes }); if(actor.Army() == 2) GamePlay.gpHUDLogCenter(null, "Attention Blues only {0} Planes are left", new object[] { numberOfAllAvailablePlanes }); } if (place.NumberOfPlanes == 3 ) { GamePlay.gpHUDLogCenter(null, "Attention only {0} Planes are left on {1}", new object[] { place.NumberOfPlanes, place.BirthPlace }); } if (place.NumberOfPlanes == 0) { GamePlay.gpHUDLogCenter(null, "Attention {0} is no longer available", new object[]{place.BirthPlace}); birthPlace.destroy(); } } }); } |
#7
|
||||
|
||||
![]()
oh and one more thing....is it possible, that if a plane lands safely on a homebase that this plane will "get back" into the list(pool) of available planes?so that the the number of available planes for that spawnpoint(where the plane startet from) will not decrease in numbers, when the plane manage to make it back to a friendly airfield...?
or in other words, if a plane manages to make it back home safely, that "this" plane can be used again Last edited by David198502; 06-21-2012 at 12:35 PM. |
#8
|
|||
|
|||
![]() Quote:
Example: Code:
GamePlay.gpHUDLogCenter(null, "First", null); Timeout(5, () => { GamePlay.gpHUDLogCenter(null, "Second", null); }); Quote:
|
#9
|
||||
|
||||
![]() Quote:
|
![]() |
|
|