Jump to content
Sign in to follow this  
-ami- mofo

trigger not firing for player if in AI vehicle

Recommended Posts

Hi guys I have a trigger activated by blufor with this in the condition:

{isPlayer _x} count thisList > 0;

as I only want it activated by a player, not AI.

The problem is the player is inside an AI controlled vehicle going through the trigger and the trigger won't fire.

Anyway to get around this so it still sees the player inside the AI vehicle?

Thanks.

Share this post


Link to post
Share on other sites

vehicle player in thislist;

or

{vehicle player} count thislist > 0;

Share this post


Link to post
Share on other sites

This didn't work....

{vehicle player} count thislist > 0; 

But this did.....

vehicle player in thislist;

Not being a scripter could you please tell me what the difference is between these two bits of code?

Share this post


Link to post
Share on other sites

one works, the other one not :) count is used to return a number from conditions, but they must be valid condition, like, for example {alive _x} count units group player; it returns the number of alive units in your group.

The other line is different stuff... vehicle player returns the vehicle is using the player and not the soldier itself (except when it's not in a vehicle, of course)

Share this post


Link to post
Share on other sites

I just discovered a bit of a hiccup.

this...

vehicle player in thislist;

works fine in MP for me (being the host machine) but isn't triggered by the other players.

this...

{vehicle player} count thislist > 0;

doesn't work at all for anybody including me.

What code would make it work for everybody?

Share this post


Link to post
Share on other sites

{(vehicle _x in thislist)} count playableUnits > 0;

Try that! (Not an MP expert, I'm afraid)

Share this post


Link to post
Share on other sites

Hi mate I just ended up grouping the trigger to the group team leader and choosing activation 'anybody in the group'. That works.

But I'll try yours too! thanks.

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
Sign in to follow this  

×