Jump to content
Wilson543210

Basically an AttachTo during MP mission.

Recommended Posts

Hello everyone.

 

I have a request for some help here.

I am trying to find a way for players to use AttachTo (or something that works similarly) during a live MP mission. We use ACE and have ACE Fortify, so before we end safe start we can place objects, but once it ends the function is disabled. I was wondering if anyone can point me in the right direction on how to get this started. I know how to add an action for scroll wheel or for ACE, but I would really appreciate help on how to start this kind of script.

Basically where the players could put objects and fuse them to vehicles. If anyone remembers some of those heavier modded DayZ Mod servers like Epoch, you could put concrete barriers on SUVs and stuff.

 

Any help at all is appreciated. Thanks.

Share this post


Link to post
Share on other sites

Hello there Wilson543210,

 

I'll be honest to say that I have no experience with either Epoch or DayZ at all. Furthermore, I am not sure I completely understand what you intend to do and what exactly you seek to achieve with your script. Maybe if you could be a bit more specific (or I just misunderstood something 😐) or give us some code example (or even pseudocode).

 

As for the question (as presented in the topic title) you could possibly add an action or ACE interaction which will call an attachTo command to the object you want to fortify (or attach things to). This could possibly look something like (using addAction here because I don't remember exactly how to set up an ACE interaction, but the idea is the same)

/*
 * - _objectToAttachThingsTo is the object you want to attach things to. You should somehow add the action to it, like in the init field on the editor.
 * - _thingToAttachToObject is what you want to attach to the _objectToAttachThingsTo. You should also somehow get the hold of it in a variable.
 */

// Add the action
_objectToAttachThingsTo addAction["Attach", {
	private _objectToAttachTo = _this select 0; // Get the object you want to attach things to
	private _thingToAttach = _this select 2; // Get the thing to attach -> Passed as an argument after the current script snippet

	_thingToAttach attachTo[_objectToAttachTo]; // This will use automatic offset -> i.e. will place the object at the relative position between the two objects
}, _thingToAttachToObject]; // Other arguments could be specified to the addAction but are omitted here

I know this is very generic and maybe not so useful to you but I am not sure how experienced you are with ArmA scripting and what exactly you want to achieve and have already implemented.

 

Please let us know if this is of any help or you would need something extra (or completely different to that).

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×