Jump to content
Sign in to follow this  
xawery

triggerattachobject

Recommended Posts

Hello, my name is Xawery and I'm a noob missionmaker. I need your help!

I'm making a coop mission about freeing captured soldiers. They are kept within an improvised compound with two guards assigned to them. There is also a full squad resting inside the compound, which makes a frontal assault rather difficult. I want the players to be able to create some kind of distraction so the squad exits the compound leaving the captives under minimal scrutiny. I tried using the Guard waypoint, but this doesn't work as it should: there's another fight going on in another city. As soon as the shooting starts the squad embarks on a 3 click hike. Yes, that is a diversion, but not exactly what I had in mind smile_o.gif

I want to do the following. I want the squad to move out as soon as a nearby fuel station is blown up. I found the triggerattachobject command in the comref; I imagine that this allows me to activate a trigger if a certain object is e.g. destroyed. However, I can't figure out how to get this to work.

In short, I want the destruction of a building to trigger a move command. Any help..?

Share this post


Link to post
Share on other sites

Ah, never mind. Figured how to use nearestobject. Does anyone know why the object command from OFP was removed from ArmA? It strikes me as a far more efficient way of dealing with such scenarios.

Share this post


Link to post
Share on other sites
Ah, never mind. Figured how to use nearestobject. Does anyone know why the object command from OFP was removed from ArmA? It strikes me as a far more efficient way of dealing with such scenarios.

Probably because of the streamingEngine changes between OFP & ArmA, not sure though. For all function descriptions and basic help, check http://community.bistudio.com

Share this post


Link to post
Share on other sites

Ah, that sounds plausible.

But out of sheer curiosity: how does triggerattachobject work?

Share this post


Link to post
Share on other sites

Triggers can be attached to static objects.

In the editor, create a trigger, then switch to Group (F2) mode, then link a static object to the trigger. The trigger is now in "Static object" mode ("STATIC"). However, you need to inscribe that object in the trigger area (it's counter-intuitive, but it is needed).

To check if that object get destroyed (not alive) just switch Activation to 'Not present' and in the "On Act." put the command you want (to test, just an hint "DESTROYED").

I suppose this scripting command is for dynamic built triggers.

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  

×