Home   Help Search Login Register  

Author Topic: HELP! with enemy Respawn Mission/Scripts for MP?  (Read 2635 times)

0 Members and 1 Guest are viewing this topic.

Offline CaptainBravo

  • Members
  • *
HELP! with enemy Respawn Mission/Scripts for MP?
« on: 03 Jul 2009, 06:49:04 »
Hi everyone,

I have done a search and found tons of examples for enemy respawn for arma but not much for arma2.

Any example missions/scripts for contiunous enemy respawn (for both infantry and vheicles/planes) ?

I am trying to creat a mission where there is an on going fierce battle all over the island as the player group moves around the Island.

Thanks in advance for your help.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: HELP! with enemy Respawn Mission/Scripts for MP?
« Reply #1 on: 03 Jul 2009, 13:11:21 »
Arma scripts should work fine. The only difference would be the class-names of the soldiers you wish to generate.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Goos

  • Members
  • *
Re: HELP! with enemy Respawn Mission/Scripts for MP?
« Reply #2 on: 04 Jul 2009, 05:30:55 »
By the sounds of things it's a coop mission your doing correct? Either way something else that might be of use to you is the ambient combat module.

on the off chance you don't know about it. What it does is you link it to a unit like your player group leader for example and wherever he goes there will be units being spawned all around him and fighting it out. The elements of this system can be altered to change ammount of units spawned, distance they spawn, type of units such as air or ground or both and things like the units skill level. The module basically dynamically spawns these things and cleans up after itself so whoever has it linked to them will basically have a battle following them around. Pretty handy and worth looking into if it's the kind of thing you need.

Just a thought.
Same $#!t different day.

Offline CaptainBravo

  • Members
  • *
Re: HELP! with enemy Respawn Mission/Scripts for MP?
« Reply #3 on: 04 Jul 2009, 19:11:59 »
Thanks for the help and quick responses.

Spooner: I have downloaded a few arma enemy respawning scripts/missions. However, converting them to arma is proving a bit more tricky than I thought. I hope someone will make scripts for arma2 for those of us with minimal scripting skills  :(

Goos: Thanks for the tip about the ambient combat module. It is for coop mssion. Do you have control in module over how how many types units spawn and type? Do ou need more than one module if you have more tha one group? on your side?

Any mission examples?

Thanks guys for your help?

Offline Goos

  • Members
  • *
Re: HELP! with enemy Respawn Mission/Scripts for MP?
« Reply #4 on: 05 Jul 2009, 00:22:12 »
I'm no pro on the scripting front by any stretch of the imagination so I may not have all the knowledge about this. If I go wrong someone in the know will hopefully point out any mistakes.

I think you need a different ACM for each group or unit but not 100% sure. Never tested it yet.

At any rate this is how you can control an ACM you place and the control options that I know of so far.

I place an ACM module and name it BIS_ACM. Then I create an init.sqf in the mission folder with the following code..

Code: [Select]
// Waits till the Module has activated.
waitUntil {!isNil {BIS_ACM getVariable "initDone"}};
waitUntil {BIS_ACM getVariable "initDone"};

// All spawned units will receive an ammunition package (Ammo ammount) based on a
// randomly selected value from this range. 0=minimum 1=maximum
[0.2, 0.5, BIS_ACM] call BIS_ACM_setAmmoFunc;

// Sets the factions that will be spawned by the ACM.
// Options are USMC, CDF, RU, INS, GUE
[["USMC", "RU"], BIS_ACM] call BIS_ACM_setFactionsFunc;

// Intensity controls how many patrols may be active at a given time and
// how often patrols are spawned. 0=minimum 1=maximum
[1, BIS_ACM] call BIS_ACM_setIntensityFunc;  

// All spawned units will receive a skill rating randomly selected from this range
// 0=minimum 1=maximum
[0, 0.5, BIS_ACM] call BIS_ACM_setSkillFunc;

// set specific minimum and maximum spawning distances for ambient patrols.
[BIS_ACM, 300, 600] call BIS_ACM_setSpawnDistanceFunc;

// This function can help to define a custom pool of patrol types and associated chances.
// 0=minimum 1=maximum
// A value of -1 will remove that type from the pool.
["ground_patrol", 1, BIS_ACM] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 0, BIS_ACM] call BIS_ACM_setTypeChanceFunc;

See the comments in the code to get an idea of what everything does.

The units that spawn are randomly generated from the group options you see in the editor. Apparently some groups appear rarer than others but I have no idea at this stage if the mission creater (i.e. us) can actually define what groups appear and what groups don't. The only option close to this I know of is at the bottom of the code I posted and that just defines air or ground units in general. You could end up with loads of armor running around blowing the place to hell or infantry swarming all over the place or a mixture of both. It's all very random but there is some control.

BE AWARE if you attach an ACM to an AI and that AI dies the ACM is gone and will no longer generate units. Also any units it had generated will most likely leave the area and dissapear. Not sure if this applies to respawning A.I. (Again I aint tested that)

Hope this all helps.

P.S. Always remember if you make changes to the init.sqf you need to reload your mission for it to take effect.
« Last Edit: 05 Jul 2009, 00:48:37 by Goos »
Same $#!t different day.

Offline CaptainBravo

  • Members
  • *
Re: HELP! with enemy Respawn Mission/Scripts for MP?
« Reply #5 on: 05 Jul 2009, 15:38:55 »
Thanks goos. I have tried the ACM and it works pretty good. The only thing there is a bit of randomness to it as you mentioned as you do not have total control over unit type being spawned.

I just tried a spawn script for arma 2 today that seems to do what I need:
http://www.armaholic.com/page.php?id=6197

It is for infantry only. I hope there will be an update for vehciles/planes which would be perfect!

Thanks.