Not necessarily - the objects could simply be created from an action menu, of prevoiusly created in the editor, placed in a discrete location and then moved to the correct point when the unit 'places' them (this is the method used in one of the Red Hammer missions - its also the method I would recommend as it allows you to prename the objects. Simplest is usually best in my book).
OK so heres how I would do it ->
Create the maximum number of available objects in your mission (lets say 10) and name them obj1 ... obj10. Next you want to create an array of the objects; in an init line or file put
objarray = [obj1,obj2,obj3....obj10] (obviously including all the object names). Also initialise an index that will pick objects from the array and check if all the objects have been used; put
objindex = 0 in an init line or file.
Give the player an added action by puting
place = player addAction ["Place Object","place.sqs"] in their init field. The script for placing the object should look something like this:
;place.sqs
;select the next object
_obj = objarray select objindex
;position the object in front of the player
_obj setpos [(getpos player select 0) + 2 * sin (getdir player), (getpos player select 1) + 2 * cos (getdir player)]
_obj setdir getdir player
;increase the index so the next object is selected
objindex = objindex + 1
;check whether to remove the added action
? objindex > 9 : player removeaction place
[_obj] exec "flaretrap.sqs"
exit
Now to add the flare trap. First we need a list of all units except the player (we don't want him setting off his own traps) -> set up a trigger covering everyone on the map. Set it to anyone present, and make the on activation
allunits = thislist - [player]. We already activted the flare trap script using the place script, so all that is left are the details of that script:
;flaretrap.sqs
;get the object
_obj = _this select 0
#loop
~2
;check if there are any units within 10m of the trap
? "_x distance _obj < 10" count allunits == 0 : goto "loop"
;create the flare
_flare = "flare" camcreate [getpos _obj select 0, getpos _obj select 1, 100]
exit
Note that I used a loop in preference to @ as it will eat up less cpu time (especially if allunits is a big list).
Hopefully this is along the lines of what you are looking for, if not then I'm sure we can come up with something else.