Bombs explode immediately when they are dropped from the aircraft

Any issues, problems or troubleshooting topics related to the additional features present in the Prepar3D Professional Plus client application.
Locked
minime
Posts: 1198
Joined: Mon Jun 10, 2013 4:33 pm

Post by minime »



I have the above problem and no idea why. As soon as I hit the bomb release the bomb immediately triggers the weapon fire event followed by the weapon exploded event.



Is there anything in Prepar3d that would trigger a bomb explosion when I set a bomb to SLEW mode while it is close to the Shooter aircraft? I think that the bombs do not respect their "time until armed" delay while in SLEW mode... how exactly does that work?



I also hope that 2.3 offers the possibility to manually explode weapons via SimConnect and to disable automatic explosions... would be a great addition.



Thx!



Minime
Adam Breed
Lockheed Martin
Posts: 1382
Joined: Mon Sep 20, 2010 6:17 pm

Post by Adam Breed »

Hi Minime,



I believe in another thread we discussed that TIME SINCE FIRED issue. We will likely want to respect that in Slew.



The only way for the bomb to ‘explode’ is to have it hit something. Does it report that it has hit something? The user aircraft, another weapon, countermeasure, etc.? Does it only happen with specific weapon (bomb) objects? Do you have it working with other attachments/weapons?
Prepar3D® Engineering Project Manager
minime
Posts: 1198
Joined: Mon Jun 10, 2013 4:33 pm

Post by minime »

Ok, to be more exact, it has nothing to do with SLEW, its just that bombs created by:



SimConnect_AICreateSimulatedObject



do not respect the "time until armed" at all. They explode before I am actually able to take them over with SLEW mode.



Yes, they "hit" the aircraft they are being launched from. :)



Happens with all bombs and also with missiles... but missiles are fast, so sometimes they clear the aircraft before Prepar3d realizes and then nothing happens. So its way worse with bombs.



What I am doing now is that I wait 4 seconds for the separation of weapon / launcher aircraft before I synchronize the weapon to the other clients. That way by the time the weapon appears on the client it is a safe distance away from the launcher aircraft.



Ideally, weapons should always respect the "time until armed", no matter if created by Prepar3d or created by SimConnect.



When I go SLEW mode, the "time in flight" for the missile stops, so I am not sure if they would ever get out of "time until armed" mode. That does not really matter though, because in reality I do not want them to explode at all, I just want them to look good until *I* tell them to explode.



This is all what I am observing, I may not be 100% correct with everything because the whole SimObject network replication code is so complicated that it is very hard to debug and find out what is really happening.



Anyway, I fixed the problem now, and I currently do not have the time to find out WHY the fix worked. ;)
Adam Breed
Lockheed Martin
Posts: 1382
Joined: Mon Sep 20, 2010 6:17 pm

Post by Adam Breed »

Yes, it likely has to do with the creation of the weapons through SimConnect_AICreateSimulatedObject, since you will need to manage more pieces when doing it through that method.



My guess is that the parent ID (OWNER OBJECT ID) is not set for the weapon, so it does not know to ignore collisions with it at initial launch.



TIME UNITL ARMED has nothing to do with collisions. Even if a weapon is not armed, it can still collide and be removed. TIME UNTIL ARMED just actives the damage/explosion effects.
Prepar3D® Engineering Project Manager
minime
Posts: 1198
Joined: Mon Jun 10, 2013 4:33 pm

Post by minime »

I would like to manage all the pieces... but can I?

I cannot set the OwnerID because the bomb explodes before I have the chance to.



I do not think that the bomb actually COLLIDES with the launcher aircraft, I think it is just close enough to trigger the proximity fuse of the weapon. I believe that because it triggers a weapon detonated event and calls the callback, so it is not just being removed, it actually explodes (and I see an effect and sound, and I know that *I* am not playing explosion sounds).



Is there a way to do this properly with the tools I have (other than cheating like I do now) or do you need to change the API for that?



Thx!
Locked