Jump to content
Sign in to follow this  
drunkenjawa

Detecting if Object NOT present trigger

Recommended Posts

Hey guys

I've run into a bit of an issue with the mission that I'm making - basically, there are a whole heap of ammo crates that the player needs to load into a nearby truck - he is stealing them. While I know about the not present trigger, which would be perfect and simple here, I can't seem to get this to work for objects as opposed to units. Basically I want to make it so a trigger fires after a player picks up and loads an ammo box (or, preferably, the whole lot of ammo boxes that are in a certain area, I'm using R3F for that) into a truck.

I thought the best way to do that would be to place a trigger on the ground which fires off once the ammo box is not there. Is there some way I can do a 'not in thisList' type trigger, that's focused on objects and not units?

Share this post


Link to post
Share on other sites

set your trigger over the area and set as follows

civilian present repeating

cond

{_x iskindof "reammobox_f"} count thislist == 0

Share this post


Link to post
Share on other sites

Works perfectly, thank you very much! Just for my info, is there any reason we're using {} instead of ()?

Share this post


Link to post
Share on other sites

It's code so it needs to be run in those brackets.

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  

×