Jump to content
Sign in to follow this  
ziga.cernic4@hotmail.com

Trigger doesn`t work correctly??

Recommended Posts

Hello!

 

 

Activation: whole group NOT present

 

On act: {deleteVehicle _x} forEach nearestObjects [tr1, ["all"], 300]

 

Why is this not working? It should work so when my WHOLE group leaves the trigger, the trigger should activate and delete everything inside(not me and my group), instead it deletes my whole group, im the only one who doesn`t get deleted. How could I fix this?

 

 

 

Share this post


Link to post
Share on other sites

Did you try to to simply run your code in the deactivation part of the trigger?

Share this post


Link to post
Share on other sites

You need to exclude your group from the array created by using "ALL" as that includes your group

 

{deleteVehicle _x} forEach nearestObjects [thistrigger, ["all"], 300] - units group player

Share this post


Link to post
Share on other sites

You need to exclude your group from the array created by using "ALL" as that includes your group

 

{deleteVehicle _x} forEach nearestObjects [tr1, ["all"], 300] - units group player

Share this post


Link to post
Share on other sites
On 23. 2. 2017 at 4:00 PM, f2k sel said:

You need to exclude your group from the array created by using "ALL" as that includes your group

 

{deleteVehicle _x} forEach nearestObjects [tr1, ["all"], 300] - units group player

 

Thanks, that works! But, what about if we are in a car? We were in a car, and the car got deleted, but we didn`t, how can I also exclude the car from deleting?

Share this post


Link to post
Share on other sites
1 hour ago, ziga.cernic4@hotmail.com said:

 

Thanks, that works! But, what about if we are in a car? We were in a car, and the car got deleted, but we didn`t, how can I also exclude the car from deleting?

{deleteVehicle _x} forEach nearestObjects ([tr1, ["all"], 300] - units group player - [vehicle player] )

Cheers

Share this post


Link to post
Share on other sites

or

{deleteVehicle _x} forEach (nearestObjects [tr1, ["all"], 300] - units player - (vehicles select {group _x == group player}));

if several vehicles.

Share this post


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

or


{deleteVehicle _x} forEach (nearestObjects ([tr1, ["all"], 300] - units player - (vehicles select {group _x == group player}));

if several vehicles.

 

This one doesn`t work, It gives me an error if I want to type the code in the trigger On Activation.

Share this post


Link to post
Share on other sites
4 hours ago, ziga.cernic4@hotmail.com said:

 

This one doesn`t work, It gives me an error if I want to type the code in the trigger On Activation.

Sorry, missing bracket ), or extra one ( ,  Corrected.

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  

×