Jump to content

Proximity trigger on deactivated entity ?


Recommended Posts

Pennix_LeGaulois
Posted

Hello Everyone !

 

It's been a while since I did any mission building for my player group. 

To save resources, I would like to activate some mission entity (ships) only when a plane from players' coalition is close by.

 

Proximity trigger seems like the right tool for that, but I cannot manage to use it to re-activate an entity after deactivating it.

I could swear it used to work (game kept checking distance to deactivated entities that had a proximity trigger target linked), am-I remembering wrong ?

 

Here's the logic that doesn't seem to work :

  • a ship, "enabled" unchecked
  • activated a first time through an activate trigger
  • deactivated a few seconds later through a deactivate trigger
  • there is 2 proximity trigger object link to that ship (no other object link, I use coalition) :
    • proximity in target linked to an activate trigger
    • proximity out target linked to a deactivate trigger
  • The idea is then to fly within range of the "proximity in" to get it activated again, but alas, "proximity in" doesn't trigger at all.
    • it should be noted that once the ship is activated again (through other mean), the "proximity in" trigger works well, so it doesn't appear to be a wrong configuration of the trigger.

 

My back-up plan would be to have Check zone along the route of the ship and use check zone "in" to reactivate the ship after players fly away and get it deactivated, but it will be much more time consuming and less flexible for future modifications of the mission...

Posted

As I understand it, you're using a Proximity MCU on an unactivated entity. In this case, a ship that's not enabled until a player gets close enough to the ship. Is that correct? 

 

If so, I'm nearly certain that the Proximity MCU will not fire, because the ship that the Proximity MCU is linked to is not enabled. If the ships are stationary, you can use two checkzones. One to check if players are near the ships, and if so; activate the ships. The other checkzone detects when the players leave the area of the ships, and if so; deactivate the ships.

 

However, I'm assuming you want to have the ships move and then be enabled when a player is near them. But I don't think the ships will move unless they're enabled. (For the same reason as the Promixity MCU not working without an enabled entity it's tied too.) Maybe others can chime in here and I could be completely wrong.

Pennix_LeGaulois
Posted (edited)
2 hours ago, Sketch said:

As I understand it, you're using a Proximity MCU on an unactivated entity. In this case, a ship that's not enabled until a player gets close enough to the ship. Is that correct? 

That's correct ! The ship has been "initialized" though, with a first activate, then a deactivate (so it should already be in memory and "known" by the server).

 

2 hours ago, Sketch said:

However, I'm assuming you want to have the ships move and then be enabled when a player is near them. But I don't think the ships will move unless they're enabled. (For the same reason as the Promixity MCU not working without an enabled entity it's tied too.) Maybe others can chime in here and I could be completely wrong.

I know ships won't move while deactivated, I tested the behavior a while back on vehicles. I just want them to be deactivated when the player is too far away to interact/ see them, and reactivated when players get close again. They would resume their movement at this point (or I could add the logic to re-trigger the waypoint they were going to when deactivated if need be).

 

2 hours ago, Sketch said:

If so, I'm nearly certain that the Proximity MCU will not fire, because the ship that the Proximity MCU is linked to is not enabled. If the ships are stationary, you can use two checkzones. One to check if players are near the ships, and if so; activate the ships. The other checkzone detects when the players leave the area of the ships, and if so; deactivate the ships.

I was nearly certain it was working at some point... But I might be remembering wrong.

 

edit : typo

Edited by Pennix_LeGaulois
Posted

As a test, I set up:   mission begin -> 10s wait -> prox trigger against on two enabled vehicles, the trigger fires.  If I deactivate one of the vehicles a couple seconds after mission begin, the prox trigger no longer fires after the 10s timer. 

 

Seems to be a logical result if deactivation intends to save cycles by omitting objects from processing loops. 

Maybe you were using Check Zones before to re-enable the Ship, like Sketch mentioned?

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...