Hi TH !
You can ether give the new object a name and then give the named object the addaction or, if the new object is created next to a known object such as the player, then you can search for the nearest object of that type and assign it that way.
Example 1 -
newObject = "ACamp" createVehicle [_xPos, _yPos, 0]
newObject addAction ["Break Camp", "breakcamp.sqs"]
OR
"ACamp" createVehicle [_xPos, _yPos, 0]
nearestobject [_player, "ACamp"] addAction ["Break Camp", "breakcamp.sqs"]
I prefer the second method, that way I can create multiple versions of the same object without having to give each one a unique name.
Good luck !
Roni