Jump to content
kagenekosama

Activation of a trigger when player is passenger

Recommended Posts

Hey all, i'm having some trouble with this.

I need a trigger to activate when player is not present. However, when player enters a vehicle (a vehicle inside the trigger area of course) as passenger and the AI is driving, the trigger gets activated, as if the player left the area or disappeared when he gets inside the vehicle.  
 

What i want is the trigger to get activated when the player is outside the area, no matter if he is on foot, as driver or a passenger of a vehicle.
 

I've tried many ways, the last one was:

 

(!(player in thislist) && !(vehicle player in thislist))

And

(driver(vehicle player) in thislist)

But both only work if player is driver or on foot, not as passenger. 

 

Thanks for you help.

 


 

Share this post


Link to post
Share on other sites

This works fine for me:

Trigger activation: ANY PRESENT

Condition: !(vehicle player in thisList) 

On act: hint "player has left"

  • Haha 1

Share this post


Link to post
Share on other sites
30 minutes ago, mrcurry said:

This works fine for me:

Trigger activation: ANY PRESENT

Condition: !(vehicle player in thisList) 

On act: hint "player has left"

Finally, if it was just a test for that, "player leaves the area", you hit a point. I was on a repeatable code for a player out of vehicle and in area... nvm

  • Like 1

Share this post


Link to post
Share on other sites

@kagenekosama, try this condition:

!(player inArea thisTrigger) or {
	_vehicle = vehicle player;

	(_vehicle != player) and {
		(((assignedVehicleRole player) select 0) == "cargo") and {
			_driver = driver _vehicle;

			!((isNull _driver) or {isPlayer _driver})
		}
	}
}

 

Share this post


Link to post
Share on other sites
10 hours ago, pierremgi said:

Finally, if it was just a test for that, "player leaves the area", you hit a point. I was on a repeatable code for a player out of vehicle and in area... nvm

This one worked thanks!

 

2 hours ago, Schatten said:

@kagenekosama, try this condition:


!(player inArea thisTrigger) or {
	_vehicle = vehicle player;

	(_vehicle != player) and {
		(((assignedVehicleRole player) select 0) == "cargo") and {
			_driver = driver _vehicle;

			!((isNull _driver) or {isPlayer _driver})
		}
	}
}

 

The same happened with this one 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×