View Full Version : onBombExploded script - doesnt work?
E69_pupo
Jun-09-2013, 14:32
public void OnBombExplosion(string title, double mass, Point3d pos, AiDamageInitiator initiator, int eventArgInt)
{
base.OnBombExplosion(title, mass, pos, initiator, eventArgInt);
GamePlay.gpHUDLogCenter("HELLO");
}
pretty simple, why aren't bomb explosions being detected by this script? this is just my hello word to see if its working and its not :(
the code compiles just fine, it simply its not triguered when my he111 bomb some farm in england
ideas?
public void OnBombExplosion(string title, double mass, Point3d pos, AiDamageInitiator initiator, int eventArgInt)
{
base.OnBombExplosion(title, mass, pos, initiator, eventArgInt);
GamePlay.gpHUDLogCenter("HELLO");
}
pretty simple, why aren't bomb explosions being detected by this script? this is just my hello word to see if its working and its not :( the code compiles just fine, it simply its not triguered when my he111 bomb some farm in england
ideas?
You forgot to override the base method with your custom method. Try adding "override"
using System;
using maddox.game;
using maddox.game.world;
using maddox.GP;
public class Mission : AMission
{
public override void OnBombExplosion(string title, double mass, Point3d pos, AiDamageInitiator initiator, int eventArgInt)
{
base.OnBombExplosion(title, mass, pos, initiator, eventArgInt);
GamePlay.gpHUDLogCenter("HELLO WORLD");
}
}
E69_pupo
Jun-10-2013, 05:44
duuuuuuhhhhhhh
i cant believe i seriusly wasted 4 hours of my life for that
thanks salmo!
E69_pupo
Jun-10-2013, 05:58
yep salmo taht solved it, now i have a perfectly working script that says Hi to every bomb who blasts the english countryside :thumbsup:
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.