Jump to content

Recommended Posts

I am having trouble with a trigger.  I have been looking in the forum for more than a couple of hours and I could not find specifically what i am looking for.   I know nothing of editing, I am only a copy-paster.

 

I want to create a zone that will delete civilians entering it.  So I have a trigger activated by civilians,  the problem is that I use  "{deleteVehicle _x} forEach thisList;" and it deletes also empty vehicles and stuff, which is not desirable.  Which would be the syntax for a trigger that would delete exclusively and only civilians entering the trigger without affecting any other element in the trigger's area?

Share this post


Link to post
Share on other sites

{deleteVehicle _x} forEach (thisList select {_x isKindOf "Man" });

 

Edit:

Maybe this would work for civilians in vehicles, too (or with modification delete entire vehicles but I like the idea of spiriting away the drivers more :D):

{{deleteVehicle _x} forEach ((crew _x) select {side _x == civilian})} forEach thisList;

Share this post


Link to post
Share on other sites

Theend3r, thanks for this, But no joy.  civilians cross the trigger as if it wasn't there

 

Action: Civilian

Activation: Present

Repeat

server only (must work for multiplayer)

condition: this

On Activation: I've tried both your proposals and both yield the same result

 

Share this post


Link to post
Share on other sites
36 minutes ago, cc_kronus said:

Theend3r, thanks for this, But no joy.  civilians cross the trigger as if it wasn't there

 

Action: Civilian

Activation: Present

Repeat

server only (must work for multiplayer)

condition: this

On Activation: I've tried both your proposals and both yield the same result

 

I've tried it and it works, both of them. :smile_o:

The only problem is that there seems to be some kind of delay between the trigger activation and de/reactivation so if a civ enters the area just as another one got deleted and before the trigger gets reset then it doesn't delete him and the trigger stays active. Otherwise, I made a trigger and had 5 civs run into it with 5s delays and it deleted all of them just fine.

 

Edit:

This works perfectly:

OJAOEhb.jpg

(Remember to set deleted = true somewhere else.)

Share this post


Link to post
Share on other sites

OK, I know why it does not work.  there are empty vehicles in the trigger area, so they are taken as "civilian" and the trigger gets activated right from start.  Precisely the purpose of the request was to see if I could avoid having to mess with the empty vehicles and the trigger would be selective enough as to get only the pedestrian civs. 

 

Also, by spiriting away the drivers, we leave on the trigger an empty vehicle that counts as civilian and keeps the trigger activated. 

Share this post


Link to post
Share on other sites
17 minutes ago, cc_kronus said:

OK, I know why it does not work.  there are empty vehicles in the trigger area, so they are taken as "civilian" and the trigger gets activated right from start.  Precisely the purpose of the request was to see if I could avoid having to mess with the empty vehicles and the trigger would be selective enough as to get only the pedestrian civs. 

 

Also, by spiriting away the drivers, we leave on the trigger an empty vehicle that counts as civilian and keeps the trigger activated. 

Ah, true, I'm stupid (although is still works :D). Changing the condition to {count crew _x > 0} count thisList > 0 could work.

 

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

×