Jump to content
Sign in to follow this  
ColeMinor

artillary and chopper transport support dont seem to work after respawn - any advice?

Recommended Posts

Hi guys,

I have been away for years, I actually was the original founder of The Unsung Vietnam war mod, and... I still love this game lol, so i'm back for Arma3.

I've been a hardcore BIS fan since we stumbled across OFP more than a decade back, just took a few years off to handle life things and such.

Seems like the game has jumped ahead ten steps this time (from arma2 to arma3), very impressed so far.

Recently I have been working on a capture the island type mission with the EOS scripts, but I'm finding that artillery and chopper transport support options stop working while playing the mission, I think it must be after I respawn I'm not synced to the modules anymore, is that correct? How can we rectify this problem?

Any help is much appreciated! Thanks

(and yes artillery is spelled wrong in the title..)

Edited by Drow09

Share this post


Link to post
Share on other sites

thanks brother!

_acm = _groupLogic createUnit ["AmbientCombatManager",position player,[],0,"NONE"];

_acm synchronizeObjectsAdd [player];

would I put that inside the player's initialization field? I'm not the greatest at coding.. I'm fairly capable with a good enough hint though. Also how would I find the names for the modules? I looked thru the classnames thread and didn't see any mention of them.

Edited by Drow09

Share this post


Link to post
Share on other sites

You'd probably use the new Support Modules instead now. Here's a video showing the basics:

To resynch you'd name your Support Requester module something like supportMod and put:

supportMod synchronizeObjectsAdd [player];

in your respawn script.

Share this post


Link to post
Share on other sites

hmm cant get it to work yet. I tried it in the description and it crashes, thats the only place there is any respawn code tho. Then i tried it in the player initialization line and it didnt crash but it didnt work either.

Ive watched most or all of those vids, I have the virtual mortars and heli transport modules going but after we respawn you cant call them in anymore, you can see them in the menu and make the call but it doesnt respond.

any other input you can offer? What did you mean by respawn script?

Also will [player] work for multiple players playing in a mp game (say a coop where more than one guy can call in mortars)?

Edited by Drow09

Share this post


Link to post
Share on other sites

Name your support requester mortarSupport. Put this in your init.sqf:

myTag_respawnMortars = {
mortarSupport synchronizeObjectsAdd [player];
};

player addMPEventHandler ["MPKilled",{_this spawn myTag_respawnMortars;}];

player will work since each player will have their own eventhandler.

Share this post


Link to post
Share on other sites

thanks dude unfortunately it didnt work either and I did exactly as you said, I checked and checked.

I would have thought this to be a common thing people discussed on here but couldnt find any topics on it.

I have the enemy occupation system, the virtual ammobox system and the new jump script in there, think those are the culprits? Also sometimes when i hit G it doesnt throw grenades for me.

Share this post


Link to post
Share on other sites

Figured out the grenades thing, it was a bug with the team leader unit, I'm using a squad leader now instead.

Regarding the resynch issue I wonder if I should do something differently. I believe when I was testing the mission in the editor as an OPFOR unit I had a thing pop up in the middle of the screen saying "you have support mortars and chopper transport" but I never tried it out. It occurred to me later that he wasn't synced to the modules.. so I unsynced the BLUFOR players to see if it would work - and it didn't.. but was I onto something? Should the player not be synched to the modules in editor if the init file does it on load up? Should we use a classname instead of the mortarSupport unit name I gave to the module?

Lastly, were you able to get this to work with that script you supplied me? I may have just been doing one step incorrectly.

EDIT - not much on this on the forums, I found this that seems to say don't place them or sync them in the editor at all:

http://forums.bistudio.com/showthread.php?118413-Resynchronize-Module/page2&highlight=resync+respawn

1. No need to place any FA modules in editor, no need to sync anything in editor. Works with JIPs and respawn.

Code:

SHK_FirstAidModules = [];

SHK_fnc_addFAModules = {

private "_o";

{

_o = _x createvehiclelocal [1,1,1];

_o synchronizeObjectsAdd playableunits;

SHK_FirstAidModules set [count SHK_FirstAidModules, _o];

} foreach ["FirstAidSystem","AlternativeInjurySimulation","BattleFieldClearance"];

};

SHK_fnc_remFAModules = {

{

deletevehicle _x;

} foreach SHK_FirstAidModules;

};

SHK_fnc_readdFAModules = {

call SHK_fnc_remFAModules;

call SHK_fnc_addFAModules;

};

// Mission start, load modules first time.

call SHK_fnc_addFAModules;

// Readd modules after respawn.

if !isdedicated then {

waituntil {!isnull player};

player addeventhandler ["respawn",SHK_fnc_readdFAModules];

};

Is there a way to edit his script for the modules in question?

Edited by Drow09

Share this post


Link to post
Share on other sites
I would have thought this to be a common thing people discussed on here but couldnt find any topics on it.

There have been a few threads/posts on it here and there, but I think most of us (who are interested) have just conceded the fact that it can't be done right now.

I'm certainly still interested, and there have to be others as well.

btw - I too tried the suggestion above, and had no luck with it either.

Share this post


Link to post
Share on other sites

ok thanks man, I found a few threads by searching "resync after respawn" and looks like there hasn't been much luck on it yet.

I'll try to find some scripts to do what I want instead of modules.

cheers.

Share this post


Link to post
Share on other sites
Name your support requester mortarSupport. Put this in your init.sqf:

myTag_respawnMortars = {
mortarSupport synchronizeObjectsAdd [player];
};

player addMPEventHandler ["MPKilled",{_this spawn myTag_respawnMortars;}];

player will work since each player will have their own eventhandler.

Does that not need to be an event handler of respawn?

Would this not just resync the module to the dead unit?

If you were to use respawn could you not loop around all synced objects of the dead unit of type request module and then resync them to the new unit?

maybe something like :-

myTag_respawnSyncRequestModules = {
_newUnit = _this select 0;
_deadUnit = _this select 1;
{
	if (typeOf _x == "SupportRequester") then {
		_x synchronizeObjectsAdd [_newUnit];
	}
} forEach synchronizedObjects _deadUnit;
};

player addMPEventHandler ["MPRespawn",{_this spawn myTag_respawnSyncRequestModules;}];

None of this is tested of course and there maybe other stuff that need initialising.

If you look in the init_requester.sqf there are loads of variables added to the player, aswell as an FSM called, they may need to be transferred as well :/.

What happens generally when you die do all variables on the player object get copied over to the new object?

You would of thought everything is copied over, I mean general triggers that are synced to you do not break, erm do they lol.

Ah things to go on the ever growing list of 'things to look into'.

/rant on

I wish there was a general listAllVariables command that you can use on objects and namespaces, would make tracking things down so much easier than trying to pull BIS scripts apart then using watch window to see what their global BIS_ variables are doing/set to. We get a nice handy function window but all their variables that they use just seem hidden away and frustratingly painful to track.

Plus their extra debug tools/addon would be good thought i saw a reference to it in the UI files was it @default or @debug.

Ah well /rant over

Edited by Larrow

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
Sign in to follow this  

×