![]() |
|
|
|
#1
|
|||
|
|||
|
No it works for Groundgroups also.
Ok it not work for trains :/ but you can use OnActorDead as a Workaround: example: Code:
public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
{
base.OnActorDead(missionNumber, shortName, actor, damages);
if (actor is AiGroundActor)
GamePlay.gpLogServer(null, "missionNumber: {0}, shortName: {1}, Type: {2}", new object[] { missionNumber, shortName, (actor as AiGroundActor).InternalTypeName() });
if (actor is AiGroundGroup)
GamePlay.gpLogServer(null, "Groundgroup: {0} destroyed", new object[] { actor.Name() });
}
Server: missionNumber: 0, shortName: 0_Chief3, Type: bob:Wagon.14T_Tank Server: missionNumber: 0, shortName: 0_Chief4, Type: bob:Wagon.10T_Cattle Server: missionNumber: 0, shortName: 0_Chief5, Type: bob:Wagon.10T_Cattle Server: missionNumber: 0, shortName: 0_Chief1, Type: bob:Wagon.C_Class_0-6-0_tender Server: missionNumber: 0, shortName: 0_Chief2, Type: bob:Wagon.14T_Tank Server: missionNumber: 0, shortName: 0_Chief0, Type: bob:Wagon.C_Class_0-6-0 Server: missionNumber: 0, shortName: 0_Chief11, Type: bob:Wagon.12T_CoveredGoods_SR Server: missionNumber: 0, shortName: 0_Chief10, Type: bob:Wagon.10T_Cattle Server: missionNumber: 0, shortName: 0_Chief7, Type: bob:Wagon.12T_CoveredGoods_SR Server: missionNumber: 0, shortName: 0_Chief6, Type: bob:Wagon.13T_5Plank_OpenGoods So you can count how many Wagon are destroyed and if enough you can show a Message etc. btw i found this in my log.txt 447] ERROR [VEHICLE] 0_Chief1 : Die by collision with crater [447] ERROR [VEHICLE] 0_Chief2 : Die by collision with crater [447] ERROR [VEHICLE] 0_Chief3 : Die by collision with crater [447] ERROR [VEHICLE] 0_Chief4 : Die by collision with crater [447] ERROR [VEHICLE] 0_Chief5 : Die by collision with crater [449] ERROR [VEHICLE] 0_Chief0 : Die by collision with crater [449] ERROR [VEHICLE] 0_Chief1 : Die by collision with crater [449] ERROR [VEHICLE] 0_Chief2 : Die by collision with crater [449] ERROR [VEHICLE] 0_Chief3 : Die by collision with crater [449] ERROR [VEHICLE] 0_Chief4 : Die by collision with crater [629] ERROR [VEHICLE] 0_Chief5 : Die by collision with crater [629] ERROR [VEHICLE] 0_Chief1 : Die by collision with crater [629] ERROR [VEHICLE] 0_Chief2 : Die by collision with crater [631] ERROR [VEHICLE] 0_Chief0 : Die by collision with crater May be this blocked the activation of the trigger? Last edited by FG28_Kodiak; 02-29-2012 at 04:55 PM. |
|
#2
|
|||
|
|||
|
Thanks FG28_Kodiak,
I thought about OnActorDead as possible work around. Yes when I destroy the train I get the ERROR [VEHICLE]..... also and I think that is the reason the trigger is not working. Have you tried swapping the train for a moving Vehicle or Column? You will notice the trigger still does not work. But unlike the train you will not get the ERROR message. I think it is an issue with moving vehicles/trains. Thanks for the above code. I will give it a shot. I think this is a bug for Dev team to fix.
__________________
__________________ Win7, 64bit Ultra Asus P8P67Pro MB Intel i7-2600K Coursair 16GB (4x 4GB), DDR3-1600MHz Gainward Nvidia 580GTX 3GB DDR5 850-Watt Modular Power Supply WIN7 and COD on Gskill SSD 240GB 40" Panasonic LCD TrackIR5 + Thrustmaster Warthog stick, throttle & pedals |
|
#3
|
|||
|
|||
|
Have tried some ingame columns and custom columns also. Ive got always a trigger (TGroupDestroyed 50%)
used this mission Code:
[PARTS] core.100 bob.100 [MAIN] MAP Land$Online_Cobra_(8x8) BattleArea 0 0 81920 81920 10000 TIME 12 WeatherIndex 0 CloudsHeight 1000 BreezeActivity 10 ThermalActivity 10 player BoB_LW_LG2_I.000 [GlobalWind_0] Power 3.000 0.000 0.000 BottomBound 0.00 TopBound 1500.00 GustPower 5 GustAngle 45 [splines] [AirGroups] BoB_LW_LG2_I.01 [BoB_LW_LG2_I.01] Flight0 1 Class Aircraft.Bf-109E-4 Formation FINGERFOUR CallSign 26 Fuel 100 Weapons 1 Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 [BoB_LW_LG2_I.01_Way] NORMFLY 34708.43 19739.43 500.00 300.00 NORMFLY 35478.40 21053.40 500.00 300.00 [CustomChiefs] Vehicle.custom_chief68 $core/icons/tank.mma [Vehicle.custom_chief68] Car.Guy_Lizard Car.Ford_V8_E917_open Car.Ford_V8_E917_open Car.Ford_V8_E917_open Car.Morris_CS8_tent Car.Morris_CS8_tent [Chiefs] 0_Chief Vehicle.custom_chief68 gb [0_Chief_Road] 34625.00 21095.09 38.40 0 9 6.11 S 15 1 0.71 10.00 P 34678.90 21114.63 S 15 4 0.10 20.00 P 39425.20 20032.66 39584.00 20128.00 38.40 S 71 0 1.00 20.00 P 39641.00 20213.00 S 71 0 0.62 20.00 P 39937.95 20543.26 S 72 0 0.43 20.00 P 40035.79 20599.33 S 72 0 0.45 40.00 P 40064.12 20630.78 40123.36 20642.46 38.40 [Stationary] [Buildings] [BuildingsLinks] [Trigger] trigger TGroupDestroyed 0_Chief 50 Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
public class Mission : AMission
{
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
GamePlay.gpLogServer(null, "missionNumber: {0}, shortName: {1}, active: {2}", new object[] { missionNumber, shortName, active });
}
}
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|