Jump to content

2LtJester

Member
  • Content Count

    7
  • Joined

  • Last visited

  • Medals

Posts posted by 2LtJester


  1. _spawnnumber=5;
    _spawnpos = getmarkerpos "bob";
    _group = creategroup resistance;
    for [{_i=0}, {_i<_spawnnumber}, {_i=_i+1}] do
    {
    _rd = random ((count CHN_UNDEAD_INFTYPES-1));
    _inftype=CHN_UNDEAD_INFTYPES select _rd;
    _inftype createUnit [_spawnpos, _group];

    };
    [/Code]

    I use this, it spawns a number of random zombie types. You can edit the number of zombies by editing _spawnnumber and you can edit where they spawn from by changing "bob".

    You can put this in an .sqf file and Exec it from a trigger or whatever you want. Remember to add a zombie somewhere on the map first.

    Note: The majority of this code is hijacked from some of Charon's excellent code.

    I THINK placing a zombie on the map first is what I've missed off :eek:

    ty for the reply and other method bobtom :D

    edit: yup it works now ive placed a zombie thanks bobtom


  2. Well, I have a script that will work. I believe you need a script to spawn zombies.

    Here is an example of one.

    SpawnZeds.sqf

    _mhpos=position ZedSpawn1;
    _spgrp2 = createGroup resistance;
    
    "CHN_ZOMBIE_Policeman" createunit [_mhpos,_spgrp2,format ["ECHO1%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Rocker2" createunit [_mhpos,_spgrp2,format ["ECHO2%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Rocker3" createunit [_mhpos,_spgrp2,format ["ECHO3%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Citizen2" createunit [_mhpos,_spgrp2,format ["ECHO4%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Citizen3" createunit [_mhpos,_spgrp2,format ["ECHO5%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Priest" createunit [_mhpos,_spgrp2,format ["ECHO6%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Profiteer4" createunit [_mhpos,_spgrp2,format ["ECHO7%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Profiteer3" createunit [_mhpos,_spgrp2,format ["ECHO8%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Profiteer2" createunit [_mhpos,_spgrp2,format ["ECHO9%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Profiteer1" createunit [_mhpos,_spgrp2,format ["ECHO10%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Policeman" createunit [_mhpos,_spgrp2,format ["ECHO11%1 = this",Wsupnum], 1, "COLONEL"];
    "CHN_ZOMBIE_Policeman" createunit [_mhpos,_spgrp2,format ["ECHO12%1 = this",Wsupnum], 1, "COLONEL"];
    sleep 13;
    CHN_ZEDINFCLD=false;
    Wsupnum=Wsupnum+1;
    

    With _mhpos being the position and _spgrp2 being the group they go under.

    And in your mission folder have a Init.sqf with

    CHN_SpawnZeds = compile preprocessfilelinenumbers  "SpawnZeds.sqf";

    This should spawn zombies now. (Don't forget to get the location!!) There are many ways to spawn zombies, this is just an example I pulled directly from Charons mission.

    Another one could be

    SPAWNZOMB1.sqf

    _group = createGroup resistance;
    "CHN_UNDEAD_Hooker2" createUnit [[1,1], _group];
    "CHN_UNDEAD_Housewife5" createUnit [[1,1], _group];
    "CHN_UNDEAD_Doctor" createUnit [[1,1], _group];
    (leader _group) setpos getpos ZOTA1;
    

    and then you could have a trigger that has on the activation field

    this exec "SPAWNZOMB1.SQF" (Or something like that)

    Another one pulled from Charons mission.

    I'm having trouble with this as well. I made a mission ages ago that used the first script, and I eventually got it to work but can't remember what else I had to do to make it work... Like Woodstock21 I tried a marker named "ZedSpawn1" and tried the same with a game logic. Neither work but I distinctly remember using a game logic in it somewhere down the line either way. Can anyone help me out? I should probably point out I've looked through Charon's demo missions as well and couldn't work out what I wasn't doing or was doing wrong XD

    Cheers in advance,

    Jester


  3. Now I'm having trouble with the safe zones. If I copy the triggers over from the example missions just one with "this; CHN_SAFELIST1=thisList;" in works, but if I try to add any others, including the second safe zone from the example mission these won't work. I tried going into the second safe zone in the example mission and that didn't seem to be working either, since the zombies just come straight into it and kill anyone within the trigger boundaries.

    wrong code perhaps or is it something I'm doing wrong? :confused:

    EDIT: Changing it to "this; CHN_SAFELIST3=thisList;" instead of CHN_SAFELIST2=thisList; seems to work... That will do :D


  4. Hey all, I've been racking my brains and doing some pretty intense searching over the last few days on how to make a simple intro at the start of my mission (though possibly not hard enough :confused:). I'm wanting to just have it fade in, with some text showing the date/time and possibly the location and operation name in the centre - essentially as it is in the campaign. I'm entirely new to this side of things in the editor, I was assuming it could be done with the trigger effects but I'm struggling to even make that work :mad:

    Is it this simple or is it far more complicated? Any help would be greatly appreciated :)

×