ok, i think that this is what you want.
This is the first script you'll be needing:
;//Found Documents Script:
#Variables
_Unit = _This Select 0
_Veh = _This Select 1
_Dist = _This Select 2
#CheckDistance
@_Unit Distance _Veh <= _Dist
#Addaction
DocLocAction = _Unit addaction ["Locate Documents", "ldocs.sqs"]
#CheckDistance2
@_Unit Distance _Veh > _Dist
_Unit RemoveAction DocLocAction
ExitLDocsScript = True
~1
If(DocsTaken) Then {Goto "Exit"}
Goto "CheckDistance"
#Exit
EndDocScript = True
Exit
This next script(ldocs.sqs) will bring up the two dialog options and will remove them as required:
#Variables
_Unit = _This
#Addaction
_ActionA = _This AddAction ["Burn Documents", "burndocs.sqs"]
_ActionB = _This AddAction ["Keep Documents", "keepdocs.sqs"]
#AwaitRemoval
If(ChoseBurnDocs) Then {Goto "ExitBurn"}
If(ChoseKeepDocs) Then {Goto "ExitKeep"}
~0.01
Goto "AwaitRemoval"
#ExitBurn
DocsTaken = True
_Unit RemoveAction _ActionA
_Unit RemoveAction _ActionB
DocumentsBurned = True
DocumentsKept = False
_Unit RemoveAction DocLocAction
Exit
#ExitKeep
DocsTaken = True
_Unit RemoveAction _ActionA
_Unit RemoveAction _ActionB
DocumentsKept = True
DocumentsBurned = False
_Unit RemoveAction DocLocAction
Exit
this is the burndocs.sqs file
will just return ChooseBurnDocs as true when activated
ChooseBurnDocs = True
this is the keepdocs.sqs file
will return ChooseKeepdocs as true when activated
ChooseKeepDocs = True
ok, i hope that this is the finished copy, haven't tested it out myself yet.
first script name:
founddocs.sqs
second:
ldocs.sqs
third:
burndocs.sqs
fourth:
keepdocs.sqs
just name them like that above
Thanks,
Bluelikeu