View Single Post
  #7  
Old 06-03-2011, 08:35 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by machoo View Post
I read somewhere on here that you can make up info boxs and it will tell you what part of the enemy part you are damaging. How do you do this?
You can use a script
like
Code:
using System;
using maddox.game;
using maddox.game.world;

public class Mission : maddox.game.AMission
{

    public override void OnAircraftDamaged(int missionNumber, string shortName, AiAircraft Aircraft, AiDamageInitiator DamageFrom, part.NamedDamageTypes WhatDamaged) 
    {
    	base.OnAircraftDamaged(missionNumber, shortName, Aircraft, DamageFrom, WhatDamaged);
    	
    	if (DamageFrom.Player != null )
    	{
    	    GamePlay.gpLogServer (null, "{0} hits {1} : {2} \n", new object [] {DamageFrom.Player, shortName, WhatDamaged});//Test
      }
    	
    }
}
The script shows the damaged part in the chat bar and in console (or serverlog if enabled).

May be usefull for training missions.

Sample Mission in Attach Bf109 against single Anson, it's a single Mission so copy the files to "\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Single"
Attached Files
File Type: zip OnAircarftDamaged1.zip (1.0 KB, 13 views)

Last edited by FG28_Kodiak; 06-03-2011 at 08:37 AM.
Reply With Quote