Jump to content
Sign in to follow this  
StarvinMarvin

Ambient Combat modules stops working after player dies and respawn

Recommended Posts

Yeah as said in the title i have problem in one of my missions. i have a small team of 4 men starting in the middle of a combatzone after a nuclear fallout and they try to get back home bla bla.. anyway ACM works flawless untill all of the guys have died once.. (the mission uses respawn) so if everyone dies one time each the battles fades of and then its piece.. do i need to make a script that syncs the module again with the "new" player after the respawn or what??

please help :D

Thanks // Marv

Share this post


Link to post
Share on other sites

I got this from the ACM thread, it works but for me when i respawn i get major lag... can you let me know how you get on

This is a little script that can re-initialize the ACM module in MP after respawn.

Code:

//**************************************************************

// This script allow the ACM Module to be re-initialized

// after the unit which it is synchronized respawn.

//

//!!IMPORTANT!! To have this script to work you MUST

// copy this line in the init field of the unit which

// has to be synchronized with the ACM module after his

// respawn:

//

// this addEventHandler ["killed", {null0 = [] execVM "acm_mod.sqf"}];

//

// THE ONLY UNIT THAT CAN ACTIVATE THE ACM MODULE IS A PLAYER GROUP

// LEADER AND ONLY ONE ACM MODULE CAN BE PRESENT IN A MISSION

//**************************************************************

//create a logic group - it is needed to create the ACM object

_LogicCenter = createCenter sideLogic;

_LogicGroup = createGroup _LogicCenter;

//wait for player respawn

waitUntil {alive player};

//Create the ACM object, add it at the "_LogicGroup" group and name it "ACM1"

"AmbientCombatManager" createUnit [[0,0,0], _LogicGroup, "ACM1 = this;"];

//synchronize the ACM object with the player !! ONLY ONE UNIT NEED TO BE SYNCHRONIZED WITH THE ACM MODULE !!

ACM1 synchronizeObjectsAdd [player];

//wait to initialize the ACM Module

waitUntil {!isNil {ACM1 getVariable "initDone"}};

_fsm = ACM1 execFSM "ca\modules\ambient_combat\data\fsms\ambientcombat.fsm";

waitUntil {ACM1 getVariable "initDone"};

//ACM module parameters

[1, ACM1] call BIS_ACM_setIntensityFunc;

[ACM1, 280, 600] call BIS_ACM_setSpawnDistanceFunc;

[["USMC", "RU", "INS"], ACM1] call BIS_ACM_setFactionsFunc;

[0.1, 1, ACM1] call BIS_ACM_setSkillFunc;

[0.1, 1, ACM1] call BIS_ACM_setAmmoFunc;

["ground_patrol", 1, ACM1] call BIS_ACM_setTypeChanceFunc;

["air_patrol", 1, ACM1] call BIS_ACM_setTypeChanceFunc;

It will work! You must write in the initline of the unit that activate the ACM module:

Code:

this addEventHandler ["killed", {null0 = [] execVM "acm_mod.sqf"}];

and remember: the ONLY unit that can activate the ACM module is a PLAYER GROUP LEADER

!! this script allow only the re-initialization of the ACM module after respawn and if you want the ACM module at the start of the mission you have to put manually the ACM module in the editor and synchronize it with the player group leader !!

Hope this can be helpful

Share this post


Link to post
Share on other sites

Going to try this now mate. Have made something that you might be interested in as well. Virtual Training System + Mando Missiles (and console) + ACM + madbull's Arty+Logistics. Let me know

Share this post


Link to post
Share on other sites
Going to try this now mate. Have made something that you might be interested in as well. Virtual Training System + Mando Missiles (and console) + ACM + madbull's Arty+Logistics. Let me know

Yep, sounds cool... im interested

Share this post


Link to post
Share on other sites

Starvin Marvin I had the same problem and I gave Norrin's Revive Script a shot ( http://forums.bistudio.com/showthread.php?t=74396 ) and although it takes a bit of work to implement it in your mission for the first time (you need to name your squadmates and place a few markers and a game logic on your map), it works fine and gives you a lot of cool things like a mobile respawn tent, bandages, medkits, wash ashore and other useful functions that add to the immersion and are all configurable to suit your needs.

It MAY look overwhelming the first time you work with it but trust me. It isn't! I know nothing about scripts and I managed to make it work. If I can do it... anyone can do it. Just read the thread, make a sample mission and when you are happy with the results, copy the scripts to your new mission folder. The only thing that changes is the mission.sqm.

It's easier than it looks. I mean I can't think of anything better than respawning on a chopper and paradroppin on the action below, that doesn't involve naked women.

Share this post


Link to post
Share on other sites
Starvin Marvin I had the same problem and I gave Norrin's Revive Script a shot ( http://forums.bistudio.com/showthread.php?t=74396 ) and although it takes a bit of work to implement it in your mission for the first time (you need to name your squadmates and place a few markers and a game logic on your map), it works fine and gives you a lot of cool things like a mobile respawn tent, bandages, medkits, wash ashore and other useful functions that add to the immersion and are all configurable to suit your needs.

It MAY look overwhelming the first time you work with it but trust me. It isn't! I know nothing about scripts and I managed to make it work. If I can do it... anyone can do it. Just read the thread, make a sample mission and when you are happy with the results, copy the scripts to your new mission folder. The only thing that changes is the mission.sqm.

It's easier than it looks. I mean I can't think of anything better than respawning on a chopper and paradroppin on the action below, that doesn't involve naked women.

His talking about Ambient Combat Module :)

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  

×