Jump to content

OnPlaneLanded only in the Home Base


Recommended Posts

Alfaunostebas11
Posted (edited)

Hello friends.

I have a problem to solve that creates some uncertainty for me.

I want that, when the player lands at their destination base (let's call it Home Base), a message will appear, like "Congratulations, you have landed and you have finished your mission!"

To do this I act in the advanced properties of the plane with an "Add event >> OnPlaneLanded Target Linked to a Subtitle".

On the map I only put an Airfield Fakefield (linked entity and edited chart) at the Home Base runway. When I land on the HB, everything works regularly but sometimes even rarely, the message also appears if I land on another airport (which has no Fakefield!), but, where perhaps is a vehicle with Rearm, Refuel and Repair option. Of course I want the message to appear only when I land on the Home Base ...

My question is: when become the OnPlaneLanded triggered ? and how can this happen only with the Home Base?

I tried some empirical and somewhat cumbersome solutions, but perhaps the problem is more easily solved...

Edited by Alfaunostebas11
Posted (edited)
14 minutes ago, Alfaunostebas11 said:

Hello friends.

I have a problem to solve that creates some uncertainty for me.

I want that, when the player lands at their destination base (let's call it Home Base), a message will appear, like "Congratulations, you have landed and you have finished your mission!"

To do this I act in the advanced properties of the plane with an "Add event >> OnPlaneLanded Target Linked to a Subtitle".

On the map I only put an Airfield Fakefield (linked entity and edited chart) at the Home Base runway. When I land on the HB, everything works regularly but sometimes even rarely, the message also appears if I land on another airport (which has no Fakefield!), but, where perhaps is a vehicle with Rearm, Refuel and Repair option. Of course I want the message to appear only when I land on the Home Base ...

My question is: when become the OnPlaneLanded triggered ? and how can this happen only with the Home Base?

I tried some empirical and somewhat cumbersome solutions, but perhaps the problem is more easily solved...

Place a check zone that is connected to the player on your HB and the check zone triggers the messages.

 

I forgot one little thing: the check zone must not be activated immediately, but shortly before landing.
 
 
 
 
Edited by namhee2
Alfaunostebas11
Posted (edited)

Ah, Namhee2, you suggest a check zone ...? It can be a good idea.

However, I have used something similar.

The OnPlaneLanded activates a Proxy that detects when the plane - therefore after landing - enters the radius of an object on the side of the runway (which I call Hook Block) and this triggers the message and the mission Objective and possibly the end of the mission. This prevents the message from being triggered when the player lands on another airport. But it is a bit cumbersome and I was hoping that there was a standard solution, connected to the presence or not of Airfield / Fakefield or something else that qualifies "tout court" an airport as Home Base for player landing.

 

EDITED: But I have experienced an unfortunate fact. Sometimes (but not always ...?!) the landing safety message appears when the aircraft has entered the range of the Proxy, but before placing the wheels on the ground. As the Proxy is supposed to be activated only by the OnPlaneLanded, so after the plane has landed, it is not clear why the message arrives before the plane has landed ?! Then I am forced to put a timer to delay the appearance of the message and the achievement of the goal by a few seconds (to give the plane time to complete the landing). But it is a complication that seems strange to me ..

Edited by Alfaunostebas11
AEthelraedUnraed
Posted (edited)
On 9/17/2021 at 2:52 PM, namhee2 said:

Place a check zone that is connected to the player on your HB and the check zone triggers the messages.

 

I forgot one little thing: the check zone must not be activated immediately, but shortly before landing.

Problem with this is that this triggers as well if you fly over the airfield without landing.

 

There's a couple of alternative solutions:

- Trigger the CheckZone upon landing. According to the Mission Editor Manual, it should trigger if any of the objects are already inside the zone. EDIT: doesn't work, see post below

- A Translator:Complex Trigger on top of the airfield. Set the radius to the size of the airfield, add the name of the player object to Object names, check Check Planes, and in the Events Filter check Object Stationary and Alive. Now you can add the corresponding event, with your message as target. Activate the Complex Trigger with a target link shortly before landing. The major advantage is that this way you can precisely specify where your player should land.

- Use the following setup:

CheckZone -> 1x counter ->
                          ---> 2x counter -> message
OnLanded  -> 1x counter ->

 

Edited by AEthelraedUnraed
  • Like 1
Posted
8 hours ago, AEthelraedUnraed said:

Problem with this is that this triggers as well if you fly over the airfield without landing.

 

There's a couple of alternative solutions:

- Trigger the CheckZone upon landing. According to the Mission Editor Manual, it should trigger if any of the objects are already inside the zone.

- A Translator:Complex Trigger on top of the airfield. Set the radius to the size of the airfield, add the name of the player object to Object names, check Check Planes, and in the Events Filter check Object Stationary and Alive. Now you can add the corresponding event, with your message as target. Activate the Complex Trigger with a target link shortly before landing. The major advantage is that this way you can precisely specify where your player should land.

- Use the following setup:

CheckZone -> 1x counter ->
                          ---> 2x counter -> message
OnLanded  -> 1x counter ->

 

You will find an issue with landing and triggering a CheckZone if you land at the last waypoint where you have a "Command Land" MCU at the end of your flight path. When the landing logic triggers and gives your plane clearance to land, it deletes the planes identity and your plane will no longer trigger a CheckZone linked to it. You can still use a Complex Trigger to do the same thing that identifies your plane by type and nationality. The name will be ignored. 

  • Thanks 1
AEthelraedUnraed
Posted
13 hours ago, Jaegermeister said:

You will find an issue with landing and triggering a CheckZone if you land at the last waypoint where you have a "Command Land" MCU at the end of your flight path. When the landing logic triggers and gives your plane clearance to land, it deletes the planes identity and your plane will no longer trigger a CheckZone linked to it.

Thanks, I did not know that.

13 hours ago, Jaegermeister said:

You can still use a Complex Trigger to do the same thing that identifies your plane by type and nationality. The name will be ignored. 

Are you sure? I think I've used the StationaryAndAlive trigger before, and I've almost exclusively used the complex trigger with object names.

Posted

Hi Alfaunostebas11, I do it in a simple way using two Complex Triggers.
The first trigger, when leaving the airport area, activates the second trigger, which after landing in the airport area activates the Mission Objective and then the typed text. And it works for me without any problems.
I enclose a few pictures as well as files to try out in the game and in the mission editor.
Hope this helps.

 

Mission objective - land.zip

 

1329295592_MissionObjective-Land1.thumb.jpg.2feb57039ad8c2de4af5219791e89981.jpg

 

849894213_MissionObjective-Land2.thumb.jpg.526e66ef81e89a9988daad74ae381342.jpg

 

1836630900_MissionObjective-Land3.thumb.jpg.4c9a6e31b37c15678152fde83ab10c80.jpg

 

990684074_MissionObjective-Land4.thumb.jpg.fd646359ffb54f48b1afd5e39f8305dc.jpg

 

 

 

 

 

 

  • Thanks 1
Posted
7 hours ago, AEthelraedUnraed said:

Are you sure? I think I've used the StationaryAndAlive trigger before, and I've almost exclusively used the complex trigger with object names.

 

I would have to test again to be sure. 

 

I am sure that the complex trigger will work after you land where the CheckZone will not. 

Posted

The Complex Trigger will definitely work with the object name after landing.

That's how I constructed my AI land/refuel/rearm/take off logic.

Posted

I confirm it works perfectly and I use it in all my missions and on multiple airfields.

Alfaunostebas11
Posted (edited)
On 9/18/2021 at 9:30 PM, PilsnerPilot said:

Hi Alfaunostebas11, I do it in a simple way using two Complex Triggers.
The first trigger, when leaving the airport area, activates the second trigger, which after landing in the airport area activates the Mission Objective and then the typed text. And it works for me without any problems.
I enclose a few pictures as well as files to try out in the game and in the mission editor.
Hope this helps.

Thank you Pilsner !

I have tested your solution and it works well !

I have adopted another solution, perhaps because I like the "Proxy" MCU more than the "Complex" (and I read somewhere that TCTs take a lot of resources).

I put an object (tipical a static Opel Blitz) about mid-edge of the runway, which I call the Hook Block. So I put a Proxy, triggered by the Player's OnPlaneLanded event. Then Object links the Proxy with the Player and the Hook block, with a distance (closer) of about half the length of the track (eg 700 m).

When the Player lands on the runway (and only on this runway ...), the Proxy is activated and, in turn, activates the message, the Mission Objective and possibly further indications for parking and / or the end of the mission.

The advantage of the Proxy, compared to the Complex, is that you don't necessarily have to stop completely the plane, as the PlaneLanded works when the speed decreases at about 25-30 km/h and then you can continue with the taxiing.

Unfortunately, as I said, sometimes (albeit rarely ...) I found that the landing safety message appears when the aircraft has entered the range of the Proxy, but before placing the wheels on the ground. As the Proxy is supposed to be activated only by the OnPlaneLanded, so after the plane has landed, it is not clear why the message arrives when tha plane is already flying...?! Then I am forced to put a timer to delay the appearance of the message and the achievement of the goal by a few seconds (to give the plane time to complete the landing). But it is a complication that seems strange to me...

 

I attach a test file with my method.

Test.zip

Edited by Alfaunostebas11
  • 2 weeks later...
Alfaunostebas11
Posted (edited)

For completeness of information, I add that I have discovered the reason why I sometimes encounter the described inconvenience, namely that the landing message, activated by the OnPlaneLanded >>> proxy sequence, arrives when the player has not yet put the wheels on the ground.

This happens when, during the mission, the player has already made another landing (for example for a Rearm Refuel Repair). In this case the proxy is activated and remains active, so it is triggered as soon as the player approaches the Home Base and enters the range of the Proxy.

So, I place a Complex Trigger on the airport (other than the Home Base) where the player could stop, I intercept it with a Plane Stationary and Alive event and deactivate the proxy.

But now I'm having another problem. Sometimes, when the player stops after landing, the Complex Trigger does not detect the situation of Stationary and Alive and does not fire. I noticed that this happens when the player's aircraft (only at some airports and with certain types of aircraft), even if it is stationary, marks a speed other than 0 on the HUD (i.e. 7 or 9 km / h). I ask: is it possible that the plane is not considered "stationary" and that, consequently, the trigger does not work ?

Edited by Alfaunostebas11
AEthelraedUnraed
Posted
7 minutes ago, Alfaunostebas11 said:

But now I'm having another problem. Sometimes, when the player stops after landing, the Complex Trigger does not detect the situation of Stationary and Alive and does not fire. I noticed that this happens when the player's aircraft (only at some airports and with certain types of aircraft), even if it is stationary, marks a speed other than 0 on the HUD (i.e. 7 or 9 km / h). I ask: is it possible that the plane is not considered "stationary" and that, consequently, the trigger does not work ?

That might be the problem yes. But I do wonder why the HUD shows 7 km/h if you're stationary? Do you have a recording of it? If so, I think you can file a bug report because if the aircraft is standing still, it should always register as "stationary" and its speed should be 0.

Alfaunostebas11
Posted
3 hours ago, AEthelraedUnraed said:

That might be the problem yes. But I do wonder why the HUD shows 7 km/h if you're stationary? Do you have a recording of it? If so, I think you can file a bug report because if the aircraft is standing still, it should always register as "stationary" and its speed should be 0.

The plane was still, be sure!

As proof of what I say, is the fact that I stopped in a maintenance area, I turned off the engine for refuel and rearm ..., but the Complex Trigger did not go off like the other times! And this has happened to me at least twice, in Surovkino's South apron and Zryaninsky's North East apron, where I had set a service truck for RRR...

Alfaunostebas11
Posted (edited)

In the attached screenshot it is clear from the various instruments that the plane is stationary and with the engine off, but the speed indicator of the HUD shows 10 km / h. This "SEEMS" (i repeat: SEEMS...) that prevents the aircraft from being considered "stationary", with all the consequences of the case for the events connected to this situation.

But why doesn't the indicator show 0 km / h?

What speed is indicated, True Airspeed (TAS), Indicated Airspeed (IAS) or Ground Speed (GS)?

Because I suspect that, being in the presence of the wind (3 m/s), the anemometer may indicate a speed that is not real, but relative to the wind itself (as when a plane takes advantage of the relative speed of the aircraft carrier which, to facilitate take-off, is placed with the bow to the wind ...).

I will try to do some tests, with and without wind, to understand if that is the problem.

In any case, a serious analysis by the Devs seems to me necessary, in order to eventually eliminate this problem.

Plane still with speed of 10.jpg

Edited by Alfaunostebas11

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...