Jump to content

Recommended Posts

I need a trigger to run code on every player/playable unit that enters  it, EXCEPT Unit_1, Unit_2 and les say Unit_3.
Most efficient way to achieve this?

Side note, script that is activated uses "Player removeaction" using something like Unit_4 in thisList && unit_5 so on and so on, wont work here.
So far script works with "this && player in thisList", but that leaves me with how im going to exclude the 3 first units.

Share this post


Link to post
Share on other sites

If you have 6 players then create 6 triggers.  Each trigger will only fire if that specific player enters the trigger area.  

.

 

Share this post


Link to post
Share on other sites

this && player in (thisList - [unit_1,unit_2,unit_3])

 

so these units are skipped (blacklisted).

 

5 hours ago, razzored said:

Side note, script that is activated uses "Player removeaction" using something like Unit_4 in thisList && unit_5 so on and so on, wont work here.
So far script works with "this && player in thisList", but that leaves me with how im going to exclude the 3 first units.


It's difficult to understand!

Player removeAction .... you should write your code, and your final aim here.

Usually this command is placed inside the addAction itself, applied on _caller (or whatever the local param for caller can be). If you don't want to get an addAction on a player:

- first, think about condition for this command if (something true) then { player addAction [...] };
- second, think about condition as the 8th parameter of  the addAction command;  example: "vehicle _target == _this"

 

exclude the 3 first units....

of what? a group? entering the trigger?  what link with the removeAction ?

Share this post


Link to post
Share on other sites
1 hour ago, pierremgi said:

this && player in (thisList - [unit_1,unit_2,unit_3])

 

so these units are skipped (blacklisted).

 


It's difficult to understand!

Player removeAction .... you should write your code, and your final aim here.

Usually this command is placed inside the addAction itself, applied on _caller (or whatever the local param for caller can be). If you don't want to get an addAction on a player:

- first, think about condition for this command if (something true) then { player addAction [...] };
- second, think about condition as the 8th parameter of  the addAction command;  example: "vehicle _target == _this"

 

exclude the 3 first units....

of what? a group? entering the trigger?  what link with the removeAction ?

Incorrect, clearly your mad scientist brain managed to solve my problem with flying colors without having any context or understanding 😛

But incase you want to know, its regarding one of the features in the new DLC which adds a module that by itself is not that multiplayer compatible, and everyone will get access to it by default.
Barely any of the coded in checks works, since i tried using all of them, so i setup something else using a trigger that will ensure that those who aren't TACP don't get the menu.

player removeAction (player getVariable ["vn_artillery_module_action_id", -1]);

 

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

×