Forum Jump :

Author Message


Posts: 18
Rank:


Level: Member

Country: us
Location: The Battlefield
Occupation:
Age: 76
In-game name:

 
#1 Posted at 2017-08-07 20:41        
     
Mission calls for the interception of a courier to retrieve some stolen documents.
I am trying to create an intel document that when the enemy unit is killed, it will be placed near his vehicle.

Arma3 doesn't allow the unit and/or vehicle to carry this type of item in inventory, anymore. See earlier Post:
http://www.armaholic.com/forums.php?m=posts&q=39217

This is what I have tried so far:
private "_veh = doc1";
private "_obj = trk1";
if !(alive courier) then { _veh = createVehicle ["Intel_File1_F", _obj setPos (getPos _obj);};

//Placed in Trigger - On Activ -

private "_veh = doc1";
if !(alive courier) then { _veh="Intel_File1_F"createVehicle position courier};

//Placed in Trigger - On Activ -

Creating intel at a markerpos by itself is doable:
veh = createVehicle ["Intel_File1_F",getMarkerPos "Marker_0", [],0, "NONE"]; //works in waypoint
but the unpredictability of the final position of the vehicle, makes it unfeasible.

Any assistance will be greatly appreciated....

This post was edited by OleGreyGhost (2017-08-07 23:27, 12 days ago)


Author Message


Posts: 1455
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2017-08-08 15:01        
     
You can't use _ local variables in a trigger unless using spawn.

Why not just let the trigger condition check the status of the courier

cond
!(alive courier)

on Act
veh = createVehicle ["Intel_File1_F", doc1 setPos (getPos trk1)]

not sure what trk1 is though.


Advertisement


Author Message


Posts: 18
Rank:


Level: Member

Country: us
Location: The Battlefield
Occupation:
Age: 76
In-game name:

 
#3 Posted at 2017-08-08 22:57        
     
@ F2kSel,

You can't use _ local variables in a trigger unless using spawn.:
[/quote]
Learned something new, I'm only halfway thru Mr. Murrays Guide.

[quote=not sure what trk1 is though.]

It is the vehicle that the courier will be travelling in.

Since the unit will not accept the "Intel" item, I figured there would be more room in the vehicle inventory.
But that is not working out too well. It seems using the init field for the vehicle doesn't work either.
Hence the crash course in scripting..

Thank you for time in clearing up my errors.

Will let you know if this works.....

Added 1 hour 34 minutes later:

Tried the trigger set up as described in your post.

Tried it with the truck & then the courier. It just would not produce the Intel doc near either unit.

Also tried placing the intel on the vehicle floor boards, but when the vehicle moved, the document stayed in place.

Switched gears & tried the "attachTo" command. I was able to get the desired effect using this command. Problem solved.

It seems to work with a live unit, but not the vehicle.

Thanks again, for taking the time to help......

This post was edited by OleGreyGhost (2017-08-09 03:10, 11 days ago)