Jump to content
Sign in to follow this  
-TW- Quintus

Problem with adding spawns to pre-made mission

Recommended Posts

Hi there,

Me and my friends have been enjoying the Zombie mission "Zombies out of Control" by H5N1 for a while now and I want to make the missions a bit more difficult by creating more spawn points for zombies to appear. The problem is, you've guessed it, the new spawn points don't work. At least, some times they do, some times they don't. Sometimes only the new ones work and the original ones don't..! Al my tests where made in the "starting area" of the mission, in which there is 1 original spawn. I have added 1 extra spawn.

This is what I have done to create the new spawn points.

First I've unpacked the missions and loaded it in the Editor. There are two files in side the mission folder that make the spawns work, namely the "init" file and the folder called "scripts" that contains all the scripts.

Inside the scripts folder I create a new SQF called "wolf" (Just a random unique name). Inside this SQF file I copy pasted the script from the original "spawn1" and edited it to look like this, the fat font is the only thing that I changed:

if (! isserver) exitwith{};

//Gruppenauswahl

_x = ceil random 1;

//Spawnpunkte

_y = ceil random 1;

private ["_spawn","_grp"];

if (_y==1) then {_spawn = getMarkerPos "wolf"};

if (_x==1) then

{

_grp = Creategroup resistance;

"CHN_UNDEAD_Doctor" createUnit [_spawn, _grp, "", 1, "LIEUTENANT"];

"CHN_UNDEAD_Policeman" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Rocker2" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_HouseWife5" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_Damsel4" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Citizen3" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Priest" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_Profiteer4" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

};

After this I opened the "init" file and added a few lines to corrospond to the original ones, again the fat font is wat I added:

execVM "briefing.sqf"

BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

zombie1 = compile preprocessFile "scripts\spawn.sqf";

zombie2 = compile preprocessFile "scripts\spawn_2.sqf";

zombie2 = compile preprocessFile "scripts\spawn_3.sqf";

major_zeds = compile preprocessFile "scripts\major_spawn.sqf";

zombie1 = compile preprocessFile "scripts\wolf.sqf";

execVM "waffenbehalten.sqf";

[] exec "intro.sqs"

ACE_NoStaminaEffects = true;

CHN_UNDEAD_FRIENDLYFIR = true;

zkiller setbehaviour "COMBAT";

zkiller setcombatmode "RED";

"objz" setMarkerAlpha 0;

"obj4" setMarkerAlpha 0;

"find_doc" setMarkerAlpha 0;

"spawn1" setMarkerAlpha 0;

"spawn2" setMarkerAlpha 0;

"spawn3" setMarkerAlpha 0;

"major_spawn1" setMarkerAlpha 0;

"major_spawn2" setMarkerAlpha 0;

"major_spawn3" setMarkerAlpha 0;

"wolf" setMarkerAlpha 0;

These are the only things that I manually added/edited inside the missions folder. After this I went in to the Editor;

I only added a new marker named "wolf", to link it with the script file. I've changed the color to black and the icon to black. I named the marker "wolf zombie 1". I've also made a new trigger (copy pasted from the original) and enlarged the radios in which the script might be "triggered"..

This all didn't help. Just now I've tested the mission (via Editor Preview) two times. The first time my own added spawn point worked, the zombies where spawing the moment I got close. The original spawn point however, didn't spawn any zombies. The 2nd time I've tested it not one spawn point worked...

So the big question on my part is, what am I doing wrong? I really hope someone knows the answer because I really don't know anything else to try..

Kind regards, Quintus

The original mod can be downloaded here: http://www.armaholic.com/page.php?id=9271

Share this post


Link to post
Share on other sites

zombie1 = compile preprocessFile "scripts\wolf.sqf";

If you notice at the top of that script theres already a "zombie1".

Try changing the one in bold to zombie3 instead.

Share this post


Link to post
Share on other sites

Thanks for the reply,

I've tried that, but it didn't work. The Zombie1 and Zombie2 are the triggers to trigger the zombie spawns to which they are linked to spawn. So i've created a new trigger called zombie3, but that didn't work either..

Share this post


Link to post
Share on other sites

Zombie1 is a script that probably gets called from elsewhere. By overwriting it you're replacing it with your own script. If you just add a new zombie4 variable, then it will just sit there and not get used. You have to look for the code that actually executes the other scripts and add your script (say, zombie4) so that it is executed as well.

Also you have 2 lines starting with zombie2 so that basically the first one of the 2 doesn't actually do anything. The second one should probably be zombie3.

Share this post


Link to post
Share on other sites

Thanks for the answer!

The scripts you are talking about are probably the "loop1,2,3" SQS files inside the scripts folder. If I open them I see the text:

~1

test = [] call zombie1;

~0.1

exit;

This is also the text found in the trigger that I added in the editor, so this must be the script that triggers the spawn1 SQF that spawns the zombies. So I've made a new loop4 file that links tot my own "wolf" SQF script which in turn has been added to the init file:

Loop4 SQS file:

~1

test = [] call zombie4;

~0.1

exit;

wolf SQF file:

if (! isserver) exitwith{};

//Gruppenauswahl

_x = ceil random 1;

//Spawnpunkte

_y = ceil random 1;

private ["_spawn","_grp"];

if (_y==1) then {_spawn = getMarkerPos "wolf"};

if (_x==1) then

{

_grp = Creategroup resistance;

"CHN_UNDEAD_Doctor" createUnit [_spawn, _grp, "", 1, "LIEUTENANT"];

"CHN_UNDEAD_Policeman" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Rocker2" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_HouseWife5" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_Damsel4" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Citizen3" createUnit [_spawn, _grp, "", 1, "SERGEANT"];

"CHN_UNDEAD_Priest" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

"CHN_UNDEAD_Profiteer4" createUnit [_spawn, _grp, "", 1, "CORPORAL"];

and the init file that links them all:

execVM "briefing.sqf"

BIS_Effects_Burn=compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";

zombie1 = compile preprocessFile "scripts\spawn.sqf";

zombie2 = compile preprocessFile "scripts\spawn_2.sqf";

zombie2 = compile preprocessFile "scripts\spawn_3.sqf";

major_zeds = compile preprocessFile "scripts\major_spawn.sqf";

zombie4 = compile preprocessFile "scripts\wolf.sqf";

execVM "waffenbehalten.sqf";

[] exec "intro.sqs"

ACE_NoStaminaEffects = true;

CHN_UNDEAD_FRIENDLYFIR = true;

zkiller setbehaviour "COMBAT";

zkiller setcombatmode "RED";

"objz" setMarkerAlpha 0;

"obj4" setMarkerAlpha 0;

"find_doc" setMarkerAlpha 0;

"spawn1" setMarkerAlpha 0;

"spawn2" setMarkerAlpha 0;

"spawn3" setMarkerAlpha 0;

"major_spawn1" setMarkerAlpha 0;

"major_spawn2" setMarkerAlpha 0;

"major_spawn3" setMarkerAlpha 0;

"wolf" setMarkerAlpha 0;

I've also tried tweaking the trigger by increasing the radius at which it can be activated by for instance BLUFOR or even "everyone". The original mod however left all these at default, so I left it at the same settings as the original trigger.

Edited by |TW| Quintus

Share this post


Link to post
Share on other sites

I don't think you can use sleep in editor code. You can only use sleep in code that is interruptible - aka spawned or execVMed (or called from interruptible context).

Share this post


Link to post
Share on other sites

Ehh sleep? Sorry but i'm not THAT familiar with the editor:)

Do you perhaps mean that

~1

test = [] call zombie4;

~0.1

exit;

should become:

~1

test = [] execVMed zombie4;

~0.1

exit;

Share this post


Link to post
Share on other sites

~1 is the same as sleep. I don't know why you need you need that sleep in there in the firstplace, but if you're writing that code in a trigger you can't use that command. Also exit is not needed in editor code and sqf scripts.

Share this post


Link to post
Share on other sites
~1 is the same as sleep. I don't know why you need you need that sleep in there in the firstplace, but if you're writing that code in a trigger you can't use that command. Also exit is not needed in editor code and sqf scripts.

I don't now why as they where already there from the original map maker. I just copied them into a new trigger and corresponding scripts. So it should be something like this:

test = [] call zombie1;

~0.1

These are the trigger settings on the first spawn:

001utc.jpg

I've created them using a tutorial I found online. The original trigger however had very different settings:

002ug.jpg

Edited by |TW| Quintus

Share this post


Link to post
Share on other sites

Either include the sleeps (~1, ~0.1) in the actual script and spawn it instead of call, or remove them altogether. Having those lines in a code that is written in the editor will cause problems.

Share this post


Link to post
Share on other sites

Thanks for the reply's m8, really appreciate it. The triggers are activated the moment the helicopter drops your team. Now I'm trying to find that specific trigger so I can delete the helo and add my own spawns at various locations.

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  

×