OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 23 Dec 2005, 21:52:58

Title: Trigger activating on location of smoke grenade
Post by: greg147 on 23 Dec 2005, 21:52:58
Hi all,

Is there a way to activate a trigger when a smoke grenade is set off within a certain area? So if the grenade is thrown into a building, the trigger activates, but if its thrown elsewhere nothing happens?

Thanks.
Title: Re:Trigger activating on location of smoke grenade
Post by: THobson on 23 Dec 2005, 22:00:37
I can only think of a complicated way to do this using a fired Event Handler, nearestObject etc.

Let's see if someone else knows a simpler way.
Title: Re:Trigger activating on location of smoke grenade
Post by: Kyle Sarnik on 23 Dec 2005, 22:10:12
Code: [Select]
? (nearestobject [building,"smokeshell"] distance building) < 5
Title: Re:Trigger activating on location of smoke grenade
Post by: THobson on 23 Dec 2005, 22:21:08
Yeh that should work.  My poor brain is working slowly tonight.
Title: Re:Trigger activating on location of smoke grenade
Post by: greg147 on 24 Dec 2005, 16:09:43
Thanks, I thought it would be more complicated that a single line of code  ;D

Solved