Jump to content

Recommended Posts

i searched in the thread but found no answer: how can i use the zombies, that spawn after infecting an human, for scripts?

i want to use "killed" eventhandler to get money for every killed zombie.

got it done for editor placed zombies and spawned ones (via own script, even dont know how to score the ones from spawn module...).

The spawn module provides the name of the group that it just spawned via:

_module getvariable "CHN_UNDEAD_SM_CURGRP";

This will be overwritten with every new spawned group, so you have to read it out in the time you need it.

Then the individual group members are easily accessible of course.

Hope that helps.

Just hang a killed EH to every zombie and it will enable you to script the score, i dont see any problems with that.

Share this post


Link to post
Share on other sites

The only bug I could find in multiplayer (This hasn't been fully tested, mind you) that if you are playing a long mission with your buddies (Like I am on a 10+ Hour mission so far with my buddies) saving the game seems to break a few of the AI's move orders but is either fixed when enough time has passed to give them more orders or you come near them.

.

Jesus!! A 10+ hour zombie mission? Can you PM me a link to it?

Share this post


Link to post
Share on other sites
Jesus!! A 10+ hour zombie mission? Can you PM me a link to it?

I am currently still working on it. It is becoming really close to releasing to the public. (Tweaks, lag issues and additonal crap)

I was not originally going to release it to the public but I have gotten many requests for it oddly enough...

Currently, I am making a video for it to release to YouTube. Sadly though, since this was intended just for my friends, it is on Sahrani and not on the normal ArmA 2 lands. So I can't imagine it being compatiable with too many players. :j:

Charon: Can I have permission to use your zombie sounds for my video? (The horde sound effects and etc?)

Edited by Minizzzile

Share this post


Link to post
Share on other sites

Charon: Can I have permission to use your zombie sounds for my video? (The horde sound effects and etc?)

Sure, good luck with your mission! ;)

Share this post


Link to post
Share on other sites

Hi, I've started to get serious about implementing triggers into my mission so naturally I'm doing all I can to learn more about them.

I'm trying to create a mission at the moment where there is a U.S Safezone, but if one zombie manages to reach the center of town it will spawn about 40-60 zeds (or perhaps activate the spawn module?) that will overwhelm the safezone. Basically causing humans to lose.

How would I go by implementing this? Thank you

Share this post


Link to post
Share on other sites

Well, the easiest way would be using a spawn module.

Create a trigger somewhere in the middle of the town with the radius you want.

Make it so when an "Independent" (Faction zombies are put under I believe) is "present"

within the trigger that

Onact

MODULENAME setvariable ["CHN_UNDEAD_SM_ACTIVE",true];

I believe that will work but I havn't tried it. Scripting for me is hard when you are used to making maps for Valves games and you switch over to ArmA 2... So don't blame me if it dosen't work! Haha.

Share this post


Link to post
Share on other sites

Hi everyone, first post :)

I was wondering if it was just me but if i play as a zombie, the zombies i create attack me and kill me.

I know this mod isn't made to let you be a zombie but in ARMA 1 i had great fun infected military camps :)

PS: Mod rocks!

Share this post


Link to post
Share on other sites
Hi, I've started to get serious about implementing triggers into my mission so naturally I'm doing all I can to learn more about them.

I'm trying to create a mission at the moment where there is a U.S Safezone, but if one zombie manages to reach the center of town it will spawn about 40-60 zeds (or perhaps activate the spawn module?) that will overwhelm the safezone. Basically causing humans to lose.

How would I go by implementing this? Thank you

The thing is that no zombie will be able to enter a safezone trigger.

If you just called your town Safezone without using the triggers, then of course it works.

I would recommend using the spawn functions if it is just a one time spawn, but thats totally up to you.

Minizzzile explained it well.

For the zeds to storm a safezone trigger- protected town you would just setpos [0,0] the actual trigger and the zeds can then enter.

Share this post


Link to post
Share on other sites

Yes I didn't actually mean using the Safezone trigger, that was just my name for the region :) I think a one time spawn would work, do you have any more information on this?

The threads here and on Armaholic don't yield much information about triggers and at that there isn't much detailed knowledge for ARMA 2.

Also thanks Mini, I will for sure use that.

Share this post


Link to post
Share on other sites
Hi everyone, first post :)

I was wondering if it was just me but if i play as a zombie, the zombies i create attack me and kill me.

I know this mod isn't made to let you be a zombie but in ARMA 1 i had great fun infected military camps :)

PS: Mod rocks!

i think i asked something along the lines of this a while back, there is a script of some sorts (i am too lazy to go searching for the exact stuff :o) that makes the zeds attack the player, the zed you play as is also trying to kill you, Resulting in killing yourself

Edited by That guy Over there

Share this post


Link to post
Share on other sites
Hi everyone, first post :)

I was wondering if it was just me but if i play as a zombie, the zombies i create attack me and kill me.

I know this mod isn't made to let you be a zombie but in ARMA 1 i had great fun infected military camps :)

PS: Mod rocks!

The proximity of the zeds to the player is checked by multiple scripts because the arma2-inherent script lag has always prevented the zeds to actually hit the player even if you just run through a whole mob of them.

So that makes it not possible to be player and zed in the same time.

@Raserisk:

I think a one time spawn would work, do you have any more information on this?

The information is in the documentation:

Functions:

[_spawnpos,_spawnnumber] call CHN_UNDEAD_fn_CRTZEDGRP

spawns a group of random type undead with _spawnnumber members

returns: group

Share this post


Link to post
Share on other sites

Hmm, Charon, I could of sworn that a script making AI join your group was in one of your missions but I can't seem to find it...

I just need to force a few AI to join a players squad once they reach a certain area...

EDIT:

crappy video for those who wanted to see part of it. Edited by Minizzzile

Share this post


Link to post
Share on other sites
Hmm, Charon, I could of sworn that a script making AI join your group was in one of your missions but I can't seem to find it...

I just need to force a few AI to join a players squad once they reach a certain area...

EDIT:

crappy video for those who wanted to see part of it.

Look into the script "InfSupport.sqf"

in the demo mission rapidcontainment

Share this post


Link to post
Share on other sites

I'm trying to create a script that respawns a group when the ZEDCNT is <5

I want the spawned group to have the varibale: setvariable "CHN_UNDEAD_SM_GRPTYPE","MIGRATING",true];

How is this done?

So far I have:

Unit Monitor

CHNTimer = 0;
Wsupnum=0;
_walive = 0;
CHN_HELOWAIT=false;
CHN_ZEDINFCLD=false;
CHN_WINFCLD=false;
sleep 15;
while {alive player} 
do
{
if ((CHN_UNDEAD_ZEDCNT<5) and ! CHN_ZEDINFCLD) then
{
	[] spawn CHN_SpawnZeds;
	CHN_ZEDINFCLD=true;

SpawnZeds

_mhpos=position ZedSpawn1;
_spgrp2 = createGroup resistance;

"CHN_UNDEAD_Policeman" createunit [_mhpos,_spgrp2,format ["ECHO1%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Rocker2" createunit [_mhpos,_spgrp2,format ["ECHO2%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_HouseWife5" createunit [_mhpos,_spgrp2,format ["ECHO3%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Damsel4" createunit [_mhpos,_spgrp2,format ["ECHO4%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Citizen3" createunit [_mhpos,_spgrp2,format ["ECHO5%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Priest" createunit [_mhpos,_spgrp2,format ["ECHO6%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Profiteer4" createunit [_mhpos,_spgrp2,format ["ECHO7%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Hooker2" createunit [_mhpos,_spgrp2,format ["ECHO8%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Secretary3" createunit [_mhpos,_spgrp2,format ["ECHO9%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Functionary2" createunit [_mhpos,_spgrp2,format ["ECHO10%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Madam3" createunit [_mhpos,_spgrp2,format ["ECHO11%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Hooker2" createunit [_mhpos,_spgrp2,format ["ECHO12%1 = this",Wsupnum], 1, "COLONEL"];
_zombiegrp setvariable ["CHN_UNDEAD_SM_GRPTYPE","MIGRATING",true];
sleep 13;
CHN_ZEDINFCLD=false;
Wsupnum=Wsupnum+1;

Init file

CHN_UnitMonitor = compile preprocessfilelinenumbers  "UnitMonitor.sqf";
CHN_SpawnZeds = compile preprocessfilelinenumbers  "SpawnZeds.sqf";


[] spawn CHN_UnitMonitor;

Where have I gone wrong?

Is there an easier way to do this?

Share this post


Link to post
Share on other sites
I'm trying to create a script that respawns a group when the ZEDCNT is <5

I want the spawned group to have the varibale: setvariable "CHN_UNDEAD_SM_GRPTYPE","MIGRATING",true];

How is this done?

So far I have:

Unit Monitor

CHNTimer = 0;
Wsupnum=0;
_walive = 0;
CHN_HELOWAIT=false;
CHN_ZEDINFCLD=false;
CHN_WINFCLD=false;
sleep 15;
while {alive player} 
do
{
if ((CHN_UNDEAD_ZEDCNT<5) and ! CHN_ZEDINFCLD) then
{
	[] spawn CHN_SpawnZeds;
	CHN_ZEDINFCLD=true;

SpawnZeds

_mhpos=position ZedSpawn1;
_spgrp2 = createGroup resistance;

"CHN_UNDEAD_Policeman" createunit [_mhpos,_spgrp2,format ["ECHO1%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Rocker2" createunit [_mhpos,_spgrp2,format ["ECHO2%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_HouseWife5" createunit [_mhpos,_spgrp2,format ["ECHO3%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Damsel4" createunit [_mhpos,_spgrp2,format ["ECHO4%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Citizen3" createunit [_mhpos,_spgrp2,format ["ECHO5%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Priest" createunit [_mhpos,_spgrp2,format ["ECHO6%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Profiteer4" createunit [_mhpos,_spgrp2,format ["ECHO7%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Hooker2" createunit [_mhpos,_spgrp2,format ["ECHO8%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Secretary3" createunit [_mhpos,_spgrp2,format ["ECHO9%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Functionary2" createunit [_mhpos,_spgrp2,format ["ECHO10%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Madam3" createunit [_mhpos,_spgrp2,format ["ECHO11%1 = this",Wsupnum], 1, "COLONEL"];
"CHN_UNDEAD_Hooker2" createunit [_mhpos,_spgrp2,format ["ECHO12%1 = this",Wsupnum], 1, "COLONEL"];
_zombiegrp setvariable ["CHN_UNDEAD_SM_GRPTYPE","MIGRATING",true];
sleep 13;
CHN_ZEDINFCLD=false;
Wsupnum=Wsupnum+1;

Init file

CHN_UnitMonitor = compile preprocessfilelinenumbers  "UnitMonitor.sqf";
CHN_SpawnZeds = compile preprocessfilelinenumbers  "SpawnZeds.sqf";


[] spawn CHN_UnitMonitor;

Where have I gone wrong?

Is there an easier way to do this?

Only a slight mistake,

the variable "CHN_UNDEAD_SM_GRPTYPE" refers to the spawn module, not to a group.

If you use the spawn script like you listed here, the spawned group will migrate anyway as it is the default behaviour for every spawned zombie group.

Hope that helped

Share this post


Link to post
Share on other sites

Thats what I presumed.

So I placed the trigger in a field away from the town, so the infected would run to the town where we where.

But they never came.

I created a chopper to check and flew over, they just stand in the field doing nothing.

Even with AI civs and troops in a nearby town.

This is why I was lead to believe they were on the static setting.

Share this post


Link to post
Share on other sites
Thats what I presumed.

So I placed the trigger in a field away from the town, so the infected would run to the town where we where.

But they never came.

I created a chopper to check and flew over, they just stand in the field doing nothing.

Even with AI civs and troops in a nearby town.

This is why I was lead to believe they were on the static setting.

You do have an undead module placed in that map, right?

And the map does have named locations, right?

What "trigger in the field" are you referring to?

Share this post


Link to post
Share on other sites
Look into the script "InfSupport.sqf"

in the demo mission rapidcontainment

Thank you for your help!

EDIT: Alright, I know this isn't mod specific but...

Does anyone know how to get command to make a pre-spawned AI join a group?

EXP: I add this to the AI I want the player to be able to add to his group

Join = this addaction ["Join Group","Join.sqs"]

Then I have a script

Join.sqs

[this] join player

Which obviously dosen't work...but I want to know if there is a way to make it work without having to define a group for a unit to be in.

I found a few but I need them to be multiplayer compatabile. (Meaning any player can take the AI)

Edited by Minizzzile

Share this post


Link to post
Share on other sites
Just hang a killed EH to every zombie and it will enable you to script the score, i dont see any problems with that.

sorry for noob question but how can i add EH to every zombie?

via classnames i guess? but coul plz anyone give me the code line for this?

for my spawned units i used:

{_x addeventhandler ["killed",{if(_this select 1 == player) then {[player] exec "scripts\Money_kill.sqs"}}]} forEach units zed1;

should i just replace "zed1" with the classnames?

Share this post


Link to post
Share on other sites
Thank you for your help!

EDIT: Alright, I know this isn't mod specific but...

Does anyone know how to get command to make a pre-spawned AI join a group?

EXP: I add this to the AI I want the player to be able to add to his group

Join = this addaction ["Join Group","Join.sqs"]

Then I have a script

Join.sqs

[this] join player

Which obviously dosen't work...but I want to know if there is a way to make it work without having to define a group for a unit to be in.

I found a few but I need them to be multiplayer compatabile. (Meaning any player can take the AI)

The correct syntax would be :

[this] join [b]group[/b] player

---------- Post added at 03:44 PM ---------- Previous post was at 03:42 PM ----------

sorry for noob question but how can i add EH to every zombie?

via classnames i guess? but coul plz anyone give me the code line for this?

for my spawned units i used:

should i just replace "zed1" with the classnames?

zed1 needs to be of the type "group" for this to work.

Share this post


Link to post
Share on other sites
[this] join group player

I think I tried that...didn't work for multiplayer. I think I found a work-around using triggers for every playable slot in the mission (So much work!)

Share this post


Link to post
Share on other sites

How do i make the zombies roam? i spawn a group or use the spawn module but if i but them in a field they just stand in formation until they see someone tasty.

Is there a way to make then roam the land at spawn?

Share this post


Link to post
Share on other sites
How do i make the zombies roam? i spawn a group or use the spawn module but if i but them in a field they just stand in formation until they see someone tasty.

Is there a way to make then roam the land at spawn?

Make sure your island DOES have named locations

Don`t spawn anything other than "migrating" groups

Make sure you placed the undead module (and the right one for the type of zombies you use)

It is as easy.

Look at the demo missions, you probably miss something

---------- Post added at 07:03 PM ---------- Previous post was at 07:01 PM ----------

I think I tried that...didn't work for multiplayer. I think I found a work-around using triggers for every playable slot in the mission (So much work!)

You would have to search the zombie´s (this) nearestobjects and check if isplayer is true, then save it into a variable and join to the group of that human player.

Share this post


Link to post
Share on other sites

AHhh okay Thanks Charon. Sadly, that is out of my scripting scope for now haha. Thank you again for the help. I will have to look into this to get it working :)

Share this post


Link to post
Share on other sites
AHhh okay Thanks Charon. Sadly, that is out of my scripting scope for now haha. Thank you again for the help. I will have to look into this to get it working :)

It`s relatively easy (AI_DUDE is the AI with the action attached):

_identifier=ObjNull;

_surrounding=nearestObjects [AI_DUDE, ["Man"], 6];

{

if (isplayer _x) then {_identifier=_x}

} foreach _surrounding;

if (!(isnull _identifier)) then {

[AI_DUDE] join group _identifier

};

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

×