![]() |
|
|
|
#1
|
|||
|
|||
|
Code:
if (aircraft.Type() == AircraftType.Bomber) //Nachricht fuer rote Spieler nach Start
{ GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Fly a recon from Manston -AW25 to LeHavre -AN4"); }
else { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Cover our shipping south of Isle of White - AD17"); }
break;
so your code is not correct. it should look like: Code:
if ((aircraft.Type() == AircraftType.Bomber) || (aircraft.Type() == AircraftType.DiveBomber))
{ GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Fly a recon from Manston -AW25 to LeHavre -AN4"); }
else { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Cover our shipping south of Isle of White - AD17"); }
|
|
#2
|
|||
|
|||
|
I tried that also, doesn´t work.
I used the same lines as for "Takeoff" and to no avail. Just have a testing version of the script here in office, that are the lines you see here, so I cannot give you the actual code, but you can join our III./JG27TestServer, map with the script should be running now (if Steam didnt disconnect). Also the || connection to Divebomber doesnt work for spawning.
__________________
http://cornedebrouwer.nl/cf48e |
|
#3
|
|||
|
|||
|
Heh hab auch bloß Kaffeepause und bin auf die dumme Idee gekommen ins 1C Forum zu schauen
![]() Ich schau mirs heute Abend mal an. |
|
#4
|
|||
|
|||
|
Ja, imer fleissig fürs BSP schaffen... ich muss auch mal wieder...
__________________
http://cornedebrouwer.nl/cf48e |
|
#5
|
|||
|
|||
|
So figured it out, the Devs made Ju87 and Ju88 to "Bomber, DiveBomber". So the earlier version with DiveBomber only, don't work anymore.
New working code (Testversion): Code:
using System;
using maddox.game;
using maddox.game.world;
public class Mission : AMission
{
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceEnter(player, actor, placeIndex);
AiAircraft aircraft = actor as AiAircraft;
if (aircraft != null)
switch (aircraft.Army())
{
case 1:
if (aircraft.Type() == AircraftType.Bomber || aircraft.Type().ToString().Equals("Bomber, DiveBomber")) //rote spieler
{
GamePlay.gpHUDLogCenter(new Player[] {player}, "roter Bomber");
}
else
{
GamePlay.gpHUDLogCenter(new Player[] {player}, "roter Jäger");
}
break;
case 2:
if (aircraft.Type() == AircraftType.Bomber || aircraft.Type().ToString().Equals("Bomber, DiveBomber")) //blaue Spieler
{
GamePlay.gpHUDLogCenter(new Player[] {player}, "blauer Bomber");
}
else
{
GamePlay.gpHUDLogCenter(new Player[] {player}, "blauer Jäger");
}
break;
}
}
}
|
|
#6
|
|||
|
|||
|
Great! Thx.
Now the stukas and ju88 do not have to escort the ju87 anymore and are allowed to sink the shipping.
__________________
http://cornedebrouwer.nl/cf48e |
![]() |
| Thread Tools | |
| Display Modes | |
|
|