I figured out that the trigger (and marker) weren't going to the right spot b/c the satchel charge (illus) was going to the player's starting location!
That's because of the order of your variable initialization. I will guess that at the start of your mission, the marker is at the same location as the player's starting location. If that is so, then there's your problem. Look at your code again.
At the start of your script, you assign values to to _mx, _my, and _mz. Later in the script, you move the marker to the player's current position, but you do not update the coordinate variables. Thus, when it comes time to camCreate your explosive, it is still using the original x, y, and z coordinates that you attained *before* you moved the marker.
To fix this, simply move the
_mX = getpos _mrkr select 0
_mY = getpos _mrkr select 1
_mZ = getpos _mrkr select 2
code after the
_mrkr setpos getpos _User
line.
You seem to have some extraneous code in your script that I can't figure out why you have it.
#Menu
[] exec "Menu.sqs"
goto "Controller"
#Controller
I suppose this is good coding practice what you did here, but since #Controller follows #Menu without any extra code inbetween, there's no need to have the
goto "Controller" line. I guess it's personal preference.
@PlaceNow
_mrkr setpos getpos _User
_CountTrig setpos getpos _User
?(!PlaceNow): goto "RemoveSensor"
Does
goto "Removesensor" ever get called? The
@PlaceNow line should only be fulfilled when PlaceNow == true, but when PlaceNow == true, then the if-then statement won't be true. Since you don't have a delay between the wait and the if-then statements to allow some other code to change PlaceNow to false, and since PlaceNow is not changed to false before the if-then statement within this script, I don't see how the if-then statement will ever be fulfilled.
goto "Plant"
#Plant
Same deal about the goto.
goto "Refresh"
#Refresh
Same deal about the goto.