Jump to content
syhrus

Dynamic Spawner - Custom factions without mods

Recommended Posts

Hi all, I'm usually just a lurker here, but I thought I'd release my dynamic spawning system seeing as I've finally got it to the point where I'm happy to hand it out to people.

So, without further ado:

 

What is it?

The Dynamic Spawner is a system that dynamically spawns units with custom loadouts, faces, voices, etc. This can add variety to your missions by giving you the ability to create factions that normally don't exist in the game - WITHOUT needing extra mods (other than gear/weapons if you want modded ones). Handy for public servers that want to avoid using mods, or for groups who want to have special factions for their scenarios without needing entire mods for new factions.

 

How do I use it?

1. Unzip the files into your mission file, and add the following to your init.sqf:

0 = execVM "SyDynSpawn\DynamicSpawnerInit.sqf";

2. Place down units in your mission (disable their simulation/model/etc) and give them the custom loadout you want.

3. Give the leaders of the groups relevant names.

4. Insert the names of the group leaders, and classnames of vehicles into the factions.sqf (check attached readme for details on how to do that)

5. Place down Game Logics where you want to spawn units and follow instructions in the readme file to set them up to spawn how you want.

 

Example Mission here: https://www.mediafire.com/file/f3749dpf4uu81ld/Dynspawn_Example.Stratis.zip

 

What does it not do yet?

I've added base elements for CAS and Helicopter reinforcements, but haven't implemented a spawner for them yet. This will be added in future.

 

Where do I get it?
Here: http://www.mediafire.com/file/nb01br9o3pu9p3v/SyDynSpawn.zip

 

Anyways, let me know if you find bugs or have questions/suggestions for future features.

  • Like 4

Share this post


Link to post
Share on other sites

Hi syhrus, sounds interesting, without me downloading and trying yet can I ask does it manage waypoints/movement etc, Does it cache units and spawn them in once player is a certain distance? 

 

Cheers

Share this post


Link to post
Share on other sites
1 minute ago, katipo66 said:

Hi syhrus, sounds interesting, without me downloading and trying yet can I ask does it manage waypoints/movement etc, Does it cache units and spawn them in once player is a certain distance? 

 

Cheers

So if I understand correctly, you would like it to keep track of custom placed units and their waypoints? In which case, no it doesn't. However that is within my ability to add that function in future.

Is does cache units when players move away, and then respawn them if the players return.

Share this post


Link to post
Share on other sites
Just now, syhrus said:

So if I understand correctly, you would like it to keep track of custom placed units and their waypoints? In which case, no it doesn't. However that is within my ability to add that function in future.

Is does cache units when players move away, and then respawn them if the players return.

 

I just wasn't sure if they were given any waypoint or patrolling functionality, if not then I guess the ability to provide them with some would be great, the ability to redress them also sounds great, ill take it for a spin next chance, cheers

  • Like 1

Share this post


Link to post
Share on other sites
Just now, katipo66 said:

 

I just wasn't sure if they were given any waypoint or patrolling functionality, if not then I guess the ability to provide them with some would be great, the ability to redress them also sounds great, ill take it for a spin next chance, cheers

Ah yes, in that case there are random waypoints given in most spawners, and others that give vague "attack here" commands after spawning.

Share this post


Link to post
Share on other sites

Hey syhrus,

 

I downloaded and had a peek, looks like some nice features, could you possibly provide a very simple sample mission, i kinda get whats going on but i like sample missions i can pull apart and understand where everything goes.

 

Also if i can picture this right, the ability to give custom waypoints as mentioned above would be an awesome function.

 

Cheers!

Share this post


Link to post
Share on other sites
2 hours ago, katipo66 said:

Hey syhrus,

 

I downloaded and had a peek, looks like some nice features, could you possibly provide a very simple sample mission, i kinda get whats going on but i like sample missions i can pull apart and understand where everything goes.

 

Also if i can picture this right, the ability to give custom waypoints as mentioned above would be an awesome function.

 

Cheers!

Here you go: https://www.mediafire.com/file/f3749dpf4uu81ld/Dynspawn_Example.Stratis.zip

  • Like 1

Share this post


Link to post
Share on other sites

For the life of me I can not figure out these errors I keep geeting.  I uploaded pictures and the script. Any help would be appreciated.

 

 

 

 

 

 

 

//Factions information for DynSpawn
//By Syhrus
//v1.0 - 170615

			//EDIT THESE VARIABLES TO SUIT YOUR SCENARIO//

_Factions 		= ["Cavalry", "Kamistan"]; 		//Faction Names
_FactionSides	= [west, east];		//Faction sides - aligns with Factions array (ie first item applies to first faction);
_FactionVoices = [
					["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
					["Male01PER", "Male02PER", "Male03PER"]
				];			//Faction voice classnames in an array - Requires at least 1 each
_FactionIdentities = [
					["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
					["Male01PER", "Male02PER", "Male03PER", "Male04PER", "Male05PER", "Male06PER"]
				];			//Faction face classnames in an array - Requires at least 1 each
_FactionInfTemplates = [
					[CAV_HEADQUATOR, CAV_TEAM1, CAV_TEAM2, CAV_MG1, CAV_AT1, CAV_AT1 ],
					[KA_TEAM_1, KA_TEAM_2, KA_TEAM_3]
				]; 			//Arrays of group leaders from templates for infantry - aligns with Factions array
							//NOTE: You CAN use this to spawn factions on sides different to their default! NATO-CSAT 
_FactionMotVeh = [
					["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", RHS_M2A3_BUSKIII", burnes_MATV"],
					["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", CUP_O_Ural_RU", rhs_tigr_sts_msv"],
					[]
					
				];			//Arrays of vehicle classnames for MOTORISED squads - leave empty if no motorised squads wanted
_FactionCrewTemplates = [
					[CAV_CREW],
					[KA_CREW]
					,[]
				];			//Arrays of mechanized and tank crew template group leaders
_FactionMechanizedVeh = [
					["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", RHS_M2A3_BUSKIII", burnes_MATV"],
					["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", CUP_O_Ural_RU", rhs_tigr_sts_msv"],
					[]
				];			//Arrays of vehicle classnames for MECHANIZED squads - leave empty array if no mechanized squads wanted
_FactionMBT = [					
					[],
					[],
					[]
				];			//Arrays of MBT classnames - leave empty array if no MBT wanted
_FactionPilots = [
					[],
					[],
					[]
				];			//Arrays of pilot template group leaders
				
_FactionTransportHeli = [
					[],
					[],
					[]
				];			//Arrays of Airborne Reinforcements helicopter classnames - leave empty if none wanted
_FactionCAS = [
					[],
					[],
					[]
				];			//Arrays of CAS vehicle clssnames - Leave empty array if none wanted
				
				

			//DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOU'RE DOING//
				
_countcheck = count _factions;
if(count _FactionSides != _countcheck)then{
	DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
}else{
	if(count _FactionInfTemplates != _countcheck)then{
		DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionInfTemplates has the wrong number of items";
	}else{
		if(count _FactionMotVeh != _countcheck)then{
			DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMotVeh has the wrong number of items";
		}else{
			if(count _FactionCrewTemplates != _countcheck)then{
				DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionCrewTemplates has the wrong number of items";
			}else{
				if(count _FactionMechanizedVeh != _countcheck)then{
					DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMechanizedVeh has the wrong number of items";
				}else{
					if(count _FactionMBT != _countcheck)then{
						DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMBT has the wrong number of items";
					}else{
						if(count _FactionPilots != _countcheck)then{
							DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
						}else{
							if(count _FactionTransportHeli != _countcheck)then{
								DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
							}else{
								if(count _FactionCAS != _countcheck)then{
									DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
								}else{
									DYNSPAWN_FACTIONS_FACTIONS = _Factions;
									DYNSPAWN_FACTIONS_SIDE = _FactionSides;
									DYNSPAWN_FACTIONS_VOICES = _FactionVoices;
									DYNSPAWN_FACTIONS_FACES = _FactionIdentities;
									DYNSPAWN_FACTIONS_INF_TEMPLATES = _FactionInfTemplates;
									DYNSPAWN_FACTIONS_MOT_VEH = _FactionMotVeh;
									DYNSPAWN_FACTIONS_CREW_TEMPLATES = _FactionCrewTemplates;
									DYNSPAWN_FACTIONS_MECH_VEH = _FactionMechanizedVeh;
									DYNSPAWN_FACTIONS_MBT = _FactionMBT;
									DYNSPAWN_FACTIONS_PILOTS = _FactionPilots;
									DYNSPAWN_FACTIONS_T_HELI = _FactionTransportHeli;
									DYNSPAWN_FACTIONS_CAS = _FactionCAS;
									DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: Factions Data Loaded";
								}
							}
						}
					}
				}
			}
		}
	}
Spoiler

F4Ru8v3.jpgf6vaozK.jpg

 

 

 

Share this post


Link to post
Share on other sites
On 8/20/2017 at 9:53 AM, jdot11 said:

For the life of me I can not figure out these errors I keep geeting.  I uploaded pictures and the script. Any help would be appreciated.

 

Line 19. You've missed some " marks for the tank classname.

Share this post


Link to post
Share on other sites
On 8/21/2017 at 11:46 PM, syhrus said:

 

Line 19. You've missed some " marks for the tank classname.

Thank you. But I'm still getting an error on line 19 and now getting one for line 15. here are the pictures and script. Again thank you.za6unBX.jpgqEz5xX7.jpg

Spoiler

//Factions information for DynSpawn
//By Syhrus
//v1.0 - 170615

            //EDIT THESE VARIABLES TO SUIT YOUR SCENARIO//

_Factions         = ["Cavalry", "Kamistan"];         //Faction Names
_FactionSides    = [west, east];        //Faction sides - aligns with Factions array (ie first item applies to first faction);
_FactionVoices = [
                    ["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
                    ["Male01PER", "Male02PER", "Male03PER"]
                ];            //Faction voice classnames in an array - Requires at least 1 each
_FactionIdentities = [
                    ["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
                    ["Male01PER", "Male02PER", "Male03PER"]
                ];            //Faction face classnames in an array - Requires at least 1 each
_FactionInfTemplates = [
                    [CAV_HEADQUATOR, CAV_TEAM1, CAV_TEAM2, CAV_MG1, CAV_AT1, CAV_AT1],
                    [KA_TEAM_1, KA_TEAM_2, KA_TEAM_3]
                ];             //Arrays of group leaders from templates for infantry - aligns with Factions array
                            //NOTE: You CAN use this to spawn factions on sides different to their default! NATO-CSAT 
_FactionMotVeh = [
                    ["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", "RHS_M2A3_BUSKIII", "burnes_MATV"],
                    ["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", "CUP_O_Ural_RU", "rhs_tigr_sts_msv"],
                    []
                    
                ];            //Arrays of vehicle classnames for MOTORISED squads - leave empty if no motorised squads wanted
_FactionCrewTemplates = [
                    [CAV_CREW],
                    [KA_CREW]
                    ,[]
                ];            //Arrays of mechanized and tank crew template group leaders
_FactionMechanizedVeh = [
                    ["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", "RHS_M2A3_BUSKIII", "burnes_MATV"],
                    ["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", "CUP_O_Ural_RU", "rhs_tigr_sts_msv"],
                    []
                ];            //Arrays of vehicle classnames for MECHANIZED squads - leave empty array if no mechanized squads wanted
_FactionMBT = [                    
                    [],
                    [],
                    []
                ];            //Arrays of MBT classnames - leave empty array if no MBT wanted
_FactionPilots = [
                    [],
                    [],
                    []
                ];            //Arrays of pilot template group leaders
                
_FactionTransportHeli = [
                    [],
                    [],
                    []
                ];            //Arrays of Airborne Reinforcements helicopter classnames - leave empty if none wanted
_FactionCAS = [
                    [],
                    [],
                    []
                ];            //Arrays of CAS vehicle clssnames - Leave empty array if none wanted
                
                

            //DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOU'RE DOING//
                
_countcheck = count _factions;
if(count _FactionSides != _countcheck)then{
    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
}else{
    if(count _FactionInfTemplates != _countcheck)then{
        DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionInfTemplates has the wrong number of items";
    }else{
        if(count _FactionMotVeh != _countcheck)then{
            DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMotVeh has the wrong number of items";
        }else{
            if(count _FactionCrewTemplates != _countcheck)then{
                DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionCrewTemplates has the wrong number of items";
            }else{
                if(count _FactionMechanizedVeh != _countcheck)then{
                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMechanizedVeh has the wrong number of items";
                }else{
                    if(count _FactionMBT != _countcheck)then{
                        DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMBT has the wrong number of items";
                    }else{
                        if(count _FactionPilots != _countcheck)then{
                            DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                        }else{
                            if(count _FactionTransportHeli != _countcheck)then{
                                DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                            }else{
                                if(count _FactionCAS != _countcheck)then{
                                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                                }else{
                                    DYNSPAWN_FACTIONS_FACTIONS = _Factions;
                                    DYNSPAWN_FACTIONS_SIDE = _FactionSides;
                                    DYNSPAWN_FACTIONS_VOICES = _FactionVoices;
                                    DYNSPAWN_FACTIONS_FACES = _FactionIdentities;
                                    DYNSPAWN_FACTIONS_INF_TEMPLATES = _FactionInfTemplates;
                                    DYNSPAWN_FACTIONS_MOT_VEH = _FactionMotVeh;
                                    DYNSPAWN_FACTIONS_CREW_TEMPLATES = _FactionCrewTemplates;
                                    DYNSPAWN_FACTIONS_MECH_VEH = _FactionMechanizedVeh;
                                    DYNSPAWN_FACTIONS_MBT = _FactionMBT;
                                    DYNSPAWN_FACTIONS_PILOTS = _FactionPilots;
                                    DYNSPAWN_FACTIONS_T_HELI = _FactionTransportHeli;
                                    DYNSPAWN_FACTIONS_CAS = _FactionCAS;
                                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: Factions Data Loaded";
                                }
                            }
                        }
                    }
                }
            }
        }
    }

 

Share this post


Link to post
Share on other sites
On 8/24/2017 at 6:43 AM, jdot11 said:

Thank you. But I'm still getting an error on line 19 and now getting one for line 15. here are the pictures and script. Again thank you.za6unBX.jpg

  Reveal hidden contents

//Factions information for DynSpawn
//By Syhrus
//v1.0 - 170615

            //EDIT THESE VARIABLES TO SUIT YOUR SCENARIO//

_Factions         = ["Cavalry", "Kamistan"];         //Faction Names
_FactionSides    = [west, east];        //Faction sides - aligns with Factions array (ie first item applies to first faction);
_FactionVoices = [
                    ["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
                    ["Male01PER", "Male02PER", "Male03PER"]
                ];            //Faction voice classnames in an array - Requires at least 1 each
_FactionIdentities = [
                    ["Male01ENG", "Male02ENG", "Male03ENG", "Male04ENG", "Male05ENG", "Male06ENG"],
                    ["Male01PER", "Male02PER", "Male03PER"]
                ];            //Faction face classnames in an array - Requires at least 1 each
_FactionInfTemplates = [
                    [CAV_HEADQUATOR, CAV_TEAM1, CAV_TEAM2, CAV_MG1, CAV_AT1, CAV_AT1],
                    [KA_TEAM_1, KA_TEAM_2, KA_TEAM_3]
                ];             //Arrays of group leaders from templates for infantry - aligns with Factions array
                            //NOTE: You CAN use this to spawn factions on sides different to their default! NATO-CSAT 
_FactionMotVeh = [
                    ["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", "RHS_M2A3_BUSKIII", "burnes_MATV"],
                    ["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", "CUP_O_Ural_RU", "rhs_tigr_sts_msv"],
                    []
                    
                ];            //Arrays of vehicle classnames for MOTORISED squads - leave empty if no motorised squads wanted
_FactionCrewTemplates = [
                    [CAV_CREW],
                    [KA_CREW]
                    ,[]
                ];            //Arrays of mechanized and tank crew template group leaders
_FactionMechanizedVeh = [
                    ["rhsusf_M1237_MK19_usarmy_d", "rhsusf_M1237_M2_usarmy_d", "RHS_M2A3_BUSKIII", "burnes_MATV"],
                    ["CUP_O_BTR90_RU", "CUP_OGAZ_Vodnik_PK_RU", "CUP_O_Ural_RU", "rhs_tigr_sts_msv"],
                    []
                ];            //Arrays of vehicle classnames for MECHANIZED squads - leave empty array if no mechanized squads wanted
_FactionMBT = [                    
                    [],
                    [],
                    []
                ];            //Arrays of MBT classnames - leave empty array if no MBT wanted
_FactionPilots = [
                    [],
                    [],
                    []
                ];            //Arrays of pilot template group leaders
                
_FactionTransportHeli = [
                    [],
                    [],
                    []
                ];            //Arrays of Airborne Reinforcements helicopter classnames - leave empty if none wanted
_FactionCAS = [
                    [],
                    [],
                    []
                ];            //Arrays of CAS vehicle clssnames - Leave empty array if none wanted
                
                

            //DO NOT EDIT PAST THIS POINT UNLESS YOU KNOW WHAT YOU'RE DOING//
                
_countcheck = count _factions;
if(count _FactionSides != _countcheck)then{
    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
}else{
    if(count _FactionInfTemplates != _countcheck)then{
        DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionInfTemplates has the wrong number of items";
    }else{
        if(count _FactionMotVeh != _countcheck)then{
            DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMotVeh has the wrong number of items";
        }else{
            if(count _FactionCrewTemplates != _countcheck)then{
                DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionCrewTemplates has the wrong number of items";
            }else{
                if(count _FactionMechanizedVeh != _countcheck)then{
                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMechanizedVeh has the wrong number of items";
                }else{
                    if(count _FactionMBT != _countcheck)then{
                        DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionMBT has the wrong number of items";
                    }else{
                        if(count _FactionPilots != _countcheck)then{
                            DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                        }else{
                            if(count _FactionTransportHeli != _countcheck)then{
                                DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                            }else{
                                if(count _FactionCAS != _countcheck)then{
                                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: ERROR IN factions.sqf - FactionSides has the wrong number of items";
                                }else{
                                    DYNSPAWN_FACTIONS_FACTIONS = _Factions;
                                    DYNSPAWN_FACTIONS_SIDE = _FactionSides;
                                    DYNSPAWN_FACTIONS_VOICES = _FactionVoices;
                                    DYNSPAWN_FACTIONS_FACES = _FactionIdentities;
                                    DYNSPAWN_FACTIONS_INF_TEMPLATES = _FactionInfTemplates;
                                    DYNSPAWN_FACTIONS_MOT_VEH = _FactionMotVeh;
                                    DYNSPAWN_FACTIONS_CREW_TEMPLATES = _FactionCrewTemplates;
                                    DYNSPAWN_FACTIONS_MECH_VEH = _FactionMechanizedVeh;
                                    DYNSPAWN_FACTIONS_MBT = _FactionMBT;
                                    DYNSPAWN_FACTIONS_PILOTS = _FactionPilots;
                                    DYNSPAWN_FACTIONS_T_HELI = _FactionTransportHeli;
                                    DYNSPAWN_FACTIONS_CAS = _FactionCAS;
                                    DYNSPAWN_MESSAGE_SENDER globalChat "DYNSPAWN: Factions Data Loaded";
                                }
                            }
                        }
                    }
                }
            }
        }
    }

 

Comma at the end of the array shouldn't be there. It isn't in the code you posted though, so just double check you've got right file open/saved.

 

When you get those errors, look for the # symbol and it'll show you where the issue is.

 

 

Share this post


Link to post
Share on other sites
On 8/28/2017 at 7:51 PM, syhrus said:

Comma at the end of the array shouldn't be there. It isn't in the code you posted though, so just double check you've got right file open/saved.

 

When you get those errors, look for the # symbol and it'll show you where the issue is.

 

 

Thank you some much. I hate to be pain, I got one problem fixed but I'm still getting an error in spawner.sqf on line 19. Is there somthing that has to change?  Thank you again.qEz5xX7.jpg

Spoiler

//Dynspawn Spawner
//Syhrus
//v1.0 170615


_script = [_this select 0] spawn {
	
	sleep 5;
	_spawner = _this select 0;
	_canspawn = true;
	
	_check = (_spawner getVariable "SpawnCost");
	if(isNil "_check")then{
		_spawner setVariable ["SpawnCost", 9999];
	};
	
	
	_faction = _spawner getVariable ["DynSpawnFaction", -1];
	if (_faction < 0 || _faction >= count DYNSPAWN_FACTIONS_FACTIONS) then {
		_spawner globalChat format ["Invalid DynSpawnFaction (%2) on type on: %1", str _spawner, _faction];
	}else{		
		while {true} do{			
			WaitUntil {(count ([_spawner] call GetPlayersInRange)) > 0 || _spawner getVariable ["DynSpawnOverrideDistance", false]};
			if(DYNSPAWN_SPAWNED < DYNSPAWN_MAX_SPAWN && (_spawner getVariable "SpawnCost")>0)then{
				switch (_spawner getVariable "DynSpawnType") do {
					case "BASE": {
						if (DYNSPAWN_CBA) then {
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnMechStatic.sqf";
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
							
						}else{
							[_faction, _spawner, 150] execVM "SyDynSpawn\SpawnScripts\SpawnMechStatic.sqf";
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
						};
						_canspawn = false;
					};
					case "PATROL": {
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
						};
					case "ATTACK": {
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\SpawnAssault.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
					};
					case "AREA": {
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\AreaSpawn.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
					};
					CASE "DEFEND": {
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
					};
					default {_spawner globalChat format ["Invalid Spawner type on: %1", name _spawner]};
					CASE "WAVE":{
							_script = [_faction, _spawner, (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\WaveSpawn.sqf";
							WaitUntil {scriptDone _script};
					};
					CASE "AMBIENTCIV":{
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\CivSpawn.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
					};
				
				};
			}else{
				WaitUntil {DYNSPAWN_SPAWNED < DYNSPAWN_MAX_SPAWN};
			};
		
		};
	};
};

 

 

Share this post


Link to post
Share on other sites
19 hours ago, jdot11 said:

Thank you some much. I hate to be pain, I got one problem fixed but I'm still getting an error in spawner.sqf on line 19. Is there somthing that has to change?  Thank you again.

  Reveal hidden contents


//Dynspawn Spawner
//Syhrus
//v1.0 170615


_script = [_this select 0] spawn {
	
	sleep 5;
	_spawner = _this select 0;
	_canspawn = true;
	
	_check = (_spawner getVariable "SpawnCost");
	if(isNil "_check")then{
		_spawner setVariable ["SpawnCost", 9999];
	};
	
	
	_faction = _spawner getVariable ["DynSpawnFaction", -1];
	if (_faction < 0 || _faction >= count DYNSPAWN_FACTIONS_FACTIONS) then {
		_spawner globalChat format ["Invalid DynSpawnFaction (%2) on type on: %1", str _spawner, _faction];
	}else{		
		while {true} do{			
			WaitUntil {(count ([_spawner] call GetPlayersInRange)) > 0 || _spawner getVariable ["DynSpawnOverrideDistance", false]};
			if(DYNSPAWN_SPAWNED < DYNSPAWN_MAX_SPAWN && (_spawner getVariable "SpawnCost")>0)then{
				switch (_spawner getVariable "DynSpawnType") do {
					case "BASE": {
						if (DYNSPAWN_CBA) then {
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnMechStatic.sqf";
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
							
						}else{
							[_faction, _spawner, 150] execVM "SyDynSpawn\SpawnScripts\SpawnMechStatic.sqf";
							
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							[_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
						};
						_canspawn = false;
					};
					case "PATROL": {
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnInfPatrol.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
						};
					case "ATTACK": {
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\SpawnAssault.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
					};
					case "AREA": {
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\AreaSpawn.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
							
					};
					CASE "DEFEND": {
							_script = [_faction, _spawner, 75] execVM "SyDynSpawn\SpawnScripts\SpawnCBADefend.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
					};
					default {_spawner globalChat format ["Invalid Spawner type on: %1", name _spawner]};
					CASE "WAVE":{
							_script = [_faction, _spawner, (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\WaveSpawn.sqf";
							WaitUntil {scriptDone _script};
					};
					CASE "AMBIENTCIV":{
							_script = [_faction, _spawner, (_spawner getVariable ["DynSpawnUnitType", "INF"]), (synchronizedObjects _spawner) select 0] execVM "SyDynSpawn\SpawnScripts\CivSpawn.sqf";
							WaitUntil {scriptDone _script};
							_spawner setVariable ["SpawnCost", 0];
					};
				
				};
			}else{
				WaitUntil {DYNSPAWN_SPAWNED < DYNSPAWN_MAX_SPAWN};
			};
		
		};
	};
};

 

 

Ahh I see what's happened. I might need to consolidate the errors a bit so it doesn't run the spawners when it detects an error.

 

What has happened is you have 2 factions set at the start (["Cavalry", "Kamistan"]) then later you have 3 items in some of the arrays, so it's picked up an error and not saved the factions data.

 

To fix it just clear out the 3rd empty array in _FactionMotVeh, _FactionCrewTemplates, _FactionMechanizedVeh, _FactionMBT, _FactionPilots, _FactionTransportHeli, & _FactionCAS

 

Thanks for all this, it's helpful for me updating the next version to be more user-friendly.

Share this post


Link to post
Share on other sites
On 8/31/2017 at 9:25 PM, syhrus said:

Ahh I see what's happened. I might need to consolidate the errors a bit so it doesn't run the spawners when it detects an error.

 

What has happened is you have 2 factions set at the start (["Cavalry", "Kamistan"]) then later you have 3 items in some of the arrays, so it's picked up an error and not saved the factions data.

 

To fix it just clear out the 3rd empty array in _FactionMotVeh, _FactionCrewTemplates, _FactionMechanizedVeh, _FactionMBT, _FactionPilots, _FactionTransportHeli, & _FactionCAS

 

Thanks for all this, it's helpful for me updating the next version to be more user-friendly.

Thank you for the help! I'm going to try it and see if it works

Share this post


Link to post
Share on other sites
On 8/31/2017 at 9:25 PM, syhrus said:

Ahh I see what's happened. I might need to consolidate the errors a bit so it doesn't run the spawners when it detects an error.

 

What has happened is you have 2 factions set at the start (["Cavalry", "Kamistan"]) then later you have 3 items in some of the arrays, so it's picked up an error and not saved the factions data.

 

To fix it just clear out the 3rd empty array in _FactionMotVeh, _FactionCrewTemplates, _FactionMechanizedVeh, _FactionMBT, _FactionPilots, _FactionTransportHeli, & _FactionCAS

 

Thanks for all this, it's helpful for me updating the next version to be more user-friendly.

Thanks for the all help. I tried that fix and still getting an error in the spawner.sqf on line 19.

Share this post


Link to post
Share on other sites

Hi, there's any way to introduce a money system script that everytime you kill a spawned unit, it gets a defined amount of this numeric variable?!

Share this post


Link to post
Share on other sites

Thanks for the awesome script! Do you think it would be possible to merge this with the EOS spawn system that some insurgency missions like BMR Insurgency use?

Share this post


Link to post
Share on other sites

Correct me if I'm wrong. 
As I know you can't activate a Game Logic entity with a Trigger.

So, is it any way to spawn a unit or group with that mod if the player enters an area or complete an objective? 
The only way I know to do it, is via a trigger.  Is it possible?!

Cheers!!

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

×