Jump to content
Sign in to follow this  
mrspongy

Player present activation of trigger, but not on all players

Recommended Posts

I am currently working on some side missions for me and my buddies. I wanted a way to make a trigger run a script for a player that enters an area. I managed to get it to work easily, but i am having an issue whre the script runs for everyone in the map. Most of the maps are small TDM maps or other things like that. When a player runs into an area which triggers the trigger, the script runs for not just him, but everyone. This is hard to play with, when some of the triggers run scripts that kill the player because he isnt supposed to be in that area. I want the trigger to only act upon the player who stepped into the area.

 

Please help

Share this post


Link to post
Share on other sites

Do you want to kill the person going into the trigger area? Make it like a forbidden zone? If so the minefield option is the best. The following will kill any player that enters the trigger.

 

Make a trigger, set it to:
ANYBODY, PRESENT, REPEATEDLY

Set the size as you need it. Forget about changing condition line, just keep "this" in it.
In the on activation line, write this:

{bomb = "Bo_GBU12_LGB" createvehicle (position _x)} foreach thislist

Share this post


Link to post
Share on other sites

simple fix to ensure a trigger affects only the local player :

 

Change the trigger condition from

this

to

this && (player in thisList)

You see, triggers activate on all clients that fulfill the condition. But the "player" variable ALWAYS points to the local player, not the one who activated the trigger.

Share this post


Link to post
Share on other sites

yes i am trying to kill only the player who enters. But for some reason "player in thislist" does not work. I have tried to do that, but it still kills every player. Is there any specifc parameters i need to set on the players? do the players need to be in their own groups rather than one large one or vis-versa?

Share this post


Link to post
Share on other sites

I want only the player who enters the zone to be affected by the script

Share this post


Link to post
Share on other sites

yes i am trying to kill only the player who enters. But for some reason "player in thislist" does not work. I have tried to do that, but it still kills every player. Is there any specifc parameters i need to set on the players? do the players need to be in their own groups rather than one large one or vis-versa?

 

Is the trigger covering the entire map? Don't see how this could happen otherwise.

I want only the player who enters the zone to be affected by the script

So do you want to kill every player that enters the zone?

Or do you want only one specific player that enters the zone?

 

Tajins suggestion triggers everytime a player controlled unit enters the zone. Just as it's supposed to.

If you only want to kill one specific player then you need to name that player in the objects init field under variable name, like myspecialplayer.

In the trigger use as condition:

this AND (myspecialplayer in thislist)

Other than that no idea how this isn't what you're looking for, need to be more specific.

 

Cheers

Share this post


Link to post
Share on other sites

I have the same issue I have a trigger with a sound effect however I only want players that is in the area to hear the sound effect not everyone on the server... For example GHOST squad is moving up a mountain and they trigger noises now they hear the noises but people back at the FOB can't hear it. How can we achieve that?

Share this post


Link to post
Share on other sites

How do i get so that the trigger only activates when ALL players are present?

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  

×