zagor64bz 1225 Posted December 7, 2015 Hi, I've been trying to add the EMPTY>INTEL>SECRET DOCUMENTS(INTERACTIVE) to a OPFOR units, so when the player kill the officer he can collect the INTEL. I can spawn the intel fine, even with custom text and pictures that shows up in the map screen and whatnot, but can't find a way to spawn them "inside" a unit. I've try with "soldierUnitName linkItem "Land_File2_F";" as suggested in another related post, with no luck. Same goes for "assignItem" and "addItem".. The only thing working so far is "attachTo", but the actual intel is clipping trough the unit and if you kill the officer they're floating over him:not very realistic. I would like to be able to search the body for the intel. Thanks to everyone willing to help! 1 Share this post Link to post Share on other sites
R3vo 2654 Posted December 7, 2015 The document object is no inventory object. You can't add it to a body. I personally would use addAction which creates a diary entry. 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 7, 2015 On 12/7/2015 at 9:22 AM, R3vo said: The document object is no inventory object. You can't add it to a body. I personally would use addAction which creates a diary entry. Thank you!! Since I'm still a noob in the editor, could you give me a step-by-step example so I can copy-paste? Share this post Link to post Share on other sites
ArmaMan360 94 Posted December 7, 2015 On 12/7/2015 at 10:33 AM, zagor64bz said: Thank you!! Since I'm still a noob in the editor, could you give me a step-by-step example so I can copy-paste? I was in a similar position till some days back, what I did was I spawned laptop next to a heli crash, and put a waituntil check where if player distance was less than 5 meters of laptop, it would trigger a hint saying. "Please wait", and then, "Acquired data" after about 5 seconds. And then the laptop would vanish like I have picked it up. ;) Then a new task spawned some miles away to deliver the intel. simple :D If you are ok with this approach, I can share the script. Thank you. 1 Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 7, 2015 On 12/7/2015 at 11:33 AM, ArmaMan360 said: I was in a similar position till some days back, what I did was I spawned laptop next to a heli crash, and put a waituntil check where if player distance was less than 5 meters of laptop, it would trigger a hint saying. "Please wait", and then, "Acquired data" after about 5 seconds. And then the laptop would vanish like I have picked it up. ;) Then a new task spawned some miles away to deliver the intel. simple :D If you are ok with this approach, I can share the script. Thank you. Thank you man, I really appreciate the help..That could be a solution, however let me explain what I'm trying to achieve here: There's an OPFOR officer RANDOMLY spawning on 6 location, wich is carryng important intels. Your mission is to locate him and retrive the intel. The intel doesn't have to be ON him, but NEAR him. So far I can randomly spawn the intel or/and the hvt, but not together. Any idea on a solution? Share this post Link to post Share on other sites
R3vo 2654 Posted December 7, 2015 On 12/7/2015 at 12:57 PM, zagor64bz said: Thank you man, I really appreciate the help..That could be a solution, however let me explain what I'm trying to achieve here: There's an OPFOR officer RANDOMLY spawning on 6 location, wich is carryng important intels. Your mission is to locate him and retrive the intel. The intel doesn't have to be ON him, but NEAR him. So far I can randomly spawn the intel or/and the hvt, but not together. Any idea on a solution? intel setPos (officer modelToWorld [1,-1,0]); //intel is the name of your document object, officer the name of the dead unit, intel will spawn one meter behind and one meter to the left(if I am not mistaking) 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 7, 2015 On 12/7/2015 at 4:29 PM, R3vo said: intel setPos (officer modelToWorld [1,-1,0]); //intel is the name of your document object, officer the name of the dead unit, intel will spawn one meter behind and one meter to the left(if I am not mistaking) THANK YOU.....That work! How do I set hight on the floor? The files are also 1 meter in the air floating.... Share this post Link to post Share on other sites
R3vo 2654 Posted December 7, 2015 _pos = officer modelToWorld [1,-1,0]; intel setPos [_pos select 0,_pos select 1,0]; that should do the trick 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted December 7, 2015 On 12/7/2015 at 5:00 PM, R3vo said: _pos = officer modelToWorld [1,-1,0]; intel setPos [_pos select 0,_pos select 1,0]; that should do the trick Thank you! Share this post Link to post Share on other sites
alexsegen 17 Posted December 11, 2015 On 12/7/2015 at 4:29 PM, R3vo said: intel setPos (officer modelToWorld [1,-1,0]); //intel is the name of your document object, officer the name of the dead unit, intel will spawn one meter behind and one meter to the left(if I am not mistaking) how do you add custom information to this spawned intel? Share this post Link to post Share on other sites
Larrow 2828 Posted December 11, 2015 Quote how do you add custom information to this spawned intel? Some info HERE 1 Share this post Link to post Share on other sites
A. Ares 16 Posted January 19, 2021 @zagor64bz mate, just saying that ACEX now have some nice intel objects that can be picked up get into inventory, give them to another player or get retrieved from a body and still contain the same info. Haven't checked it yet but I believe that even spawn them and script the whole text and/or images on them is not so difficult! 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted January 19, 2021 On 1/19/2021 at 6:23 PM, A. Ares said: @zagor64bz mate, just saying that ACEX now have some nice intel objects that can be picked up get into inventory, give them to another player or get retrieved from a body and still contain the same info. Haven't checked it yet but I believe that even spawn them and script the whole text and/or images on them is not so difficult! Thanx mate..I'll dig in on that! 1 Share this post Link to post Share on other sites
ZaellixA 384 Posted January 20, 2021 On 12/7/2015 at 4:48 PM, zagor64bz said: THANK YOU.....That work! How do I set hight on the floor? The files are also 1 meter in the air floating.... I believe that if you know that the intel is spawned one metre high from the floor (where the unit is standing) you could set the appropriate value in the command that translates the coordinates from the model to the world. This should look something like (copying and adapting R3vo's code) // R3vo's code // intel setPos (officer modelToWorld [1,-1,0]); // Adapted code intel setPos (officer modelToWorld [1,-1,-1]); // Get the coordinates 1 metre below the centre of the unit (last entry which should correspond to z-coordinate) Please make sure to test that and adapt the values accordingly... One more alternative, which may or may not be an overburden to your needs could look like (trying to be very explanatory in the snippet below, feel free to adapt) // Get the position relative to the terrain private _unitPos = getPosATL officer; // Set the position relative to the terrain with z-coordinate equal to zero (this means on the terrain) intel setPosATL [(_unitPos select 0) + 1, (_unitPos select 1) - 1, 0]; This should help a wee bit with clipping if not very close to boundaries and most probably (if I haven't made any mistakes........, which doesn't happen very often 😂) will save you from habving to "measure" (or approximate) the height at which the intel is spawned (to counter it). Please note that both of the above snippets are untested and should be treated with caution. I hope this helped somehow, or at least provided some more insight into a possibly better solution. 2 Share this post Link to post Share on other sites
zagor64bz 1225 Posted January 20, 2021 On 1/20/2021 at 5:45 PM, ZaellixA said: Please note that both of the above snippets are untested and should be treated with caution. I hope this helped somehow, or at least provided some more insight into a possibly better solution. Please, don't get me wrong... I don't want to come across ungrateful or cocky here...and REALLY appreciate your help, but I cannot avoid making you notice, with all due respect and plenty of gratitude, that the post you're referring to is 5 years old. Trust me, I wouldn't have waited all this time to find a solution😁😂🤣 Thank you anyway mate! 1 2 Share this post Link to post Share on other sites