Jump to content

Recommended Posts

So I've been working on making a custom combat patrol for my group and it's been going well so far however I've run into a bit of an issue and minor annoyance. I've got a couple of the support providers down but one of them, the supply drop, is giving me a bit of an issue. I can call the support just fine and it'll drop the crate, however instead of becoming an arsenal like I want, it's just staying a regular NATO supply crate. The script I'm putting in the init is:

_this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];

Am I doing something stupid or is the supply drop module broken?

Share this post


Link to post
Share on other sites

@Eogos

I use this in my scripts:

		["AmmoboxInit",[_YOURAMMOBOX,true]] spawn BIS_fnc_arsenal;
		_YOURAMMOBOX allowdamage false; 
		_YOURAMMOBOX disableai "anim"; 

where '_YOURAMMOBOX' would be the variable pointing to your box/vehicle/whatever

lines 2 + 3 are optional obviously...

that way an 'Arsenal' option is automatically added to the box, works in SP/MP and on dedicated

Edited by cap42

Share this post


Link to post
Share on other sites

@cap42 Wouldn't that only work if the box already existed? The supply drop module doesn't spawn the box until it gets to the drop point. Also I know the script I have already works when put into a crates init, it just doesn't seem to work on the support module.

Share this post


Link to post
Share on other sites

I haven't use that module before, BUT if you can put something in the boxes init, just use what I said, replacing _YOURAMMOBOX with 'this' (no underscore here!)

Share this post


Link to post
Share on other sites
2 minutes ago, cap42 said:

I haven't use that module before, BUT if you can put something in the boxes init, just use what I said, replacing _YOURAMMOBOX with 'this' (no underscore here!)

Alright, I'll give it a try right now.

Share this post


Link to post
Share on other sites

@cap42 just tested it right now and it didn't work. I should probably also mention this has been working in local multiplayer however once I put it on a dedicated server it stops working.

Share this post


Link to post
Share on other sites

@Eogos: a quick test revealed that you need to use '_this' when declaring the box init for the supply module. do you have scripting errors on?

the lines above work fine from scripts and object inits on my dedicated, one of the few things I've never had issues with ;)

 

Mind you I haven't tried the supply module on dedicated, but the lines above definitely work... besides the _crate which needs to be replaced accordingly... I'll fix it in my previous post

 

it definitely works with the support module on dedicated, just gave it a quick testrun, here my 'crate init' for the supply drop support provider:

["AmmoboxInit",[_this,true]] spawn BIS_fnc_arsenal; _this allowdamage false; _this disableai "anim"; 

 

Edited by cap42
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, cap42 said:

@Eogos: a quick test revealed that you need to use '_this' when declaring the box init for the supply module. do you have scripting errors on?

the lines above work fine from scripts and object inits on my dedicated, one of the few things I've never had issues with ;)

 

Mind you I haven't tried the supply module on dedicated, but the lines above definitely work... besides the _crate which needs to be replaced accordingly... I'll fix it in my previous post

 

it definitely works with the support module on dedicated, just gave it a quick testrun, here my 'crate init' for the supply drop support provider:


["AmmoboxInit",[_this,true]] spawn BIS_fnc_arsenal; _this allowdamage false; _this disableai "anim"; 

 

Alright I'll try that one once people are done playing around on the server. Yes, I always have show script errors on, nothing has shown up at all and with my original I tried both "this" and "_this" and it didn't work. As if it wasn't activating the init at all.

Share this post


Link to post
Share on other sites
45 minutes ago, Eogos said:

Alright I'll try that one once people are done playing around on the server. Yes, I always have show script errors on, nothing has shown up at all and with my original I tried both "this" and "_this" and it didn't work. As if it wasn't activating the init at all.

You should get an error using 'this' in the crate init, both on dedicated and local... seems to me like there's something amiss on your end. Are you sure you updated the mission on the dedicated?

Share this post


Link to post
Share on other sites

100% positive I did. Lemme check and make sure it's still in my launch params to have show script errors on.

Share this post


Link to post
Share on other sites
2 minutes ago, Eogos said:

100% positive I did. Lemme check and make sure it's still in my launch params to have show script errors on.

Ok yea, at some point it appears my params in Swifty for launching Arma got reset. Oops.

Share this post


Link to post
Share on other sites
5 minutes ago, cap42 said:

should have done this before, the test mission I used: arsenal crate drop mission, no mods needed

Yea your setup for it the same as mine (just different script) so idk. Maybe it's just being picky. I'll test it with the script you used for yours once people are done playing on the server.

Share this post


Link to post
Share on other sites

@cap42 Oh thank god, it works now. Thanks for your help, I guess it just didn't like the script I usually use to turn something into an arsenal.

Share this post


Link to post
Share on other sites

right, I couldn't leave well enough alone. there must be something wrong in your initial setup, because your line works without any issues on my end. Or were you just having issues in MP/dedicated? Because that would have been fixed by remoteExec like so:

[_this, {_this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];} ] remoteExecCall ["call",0,true];

Glad it's working for you now in any case!

Share this post


Link to post
Share on other sites
On 7/11/2017 at 9:51 AM, cap42 said:

right, I couldn't leave well enough alone. there must be something wrong in your initial setup, because your line works without any issues on my end. Or were you just having issues in MP/dedicated? Because that would have been fixed by remoteExec like so:


[_this, {_this addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];} ] remoteExecCall ["call",0,true];

Glad it's working for you now in any case!

I was probably just having issues with locality because we do run 2 Headless clients which I've now blacklisted all the supports from cause they were breaking artillery and such.

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

×