Respawn yomies
Moderator: Inkwizytor
Respawn yomies
Witam wszystkich.
Mam troszku duży problem :/
Pobrałem addons z yomies'ami no i jak zawsze edytor i do roboty.
Chciałbym żeby się respawnowały lecz template od cooby nie pomogło.
Zato w adonns znalazłem tekst który prawdopodobnie by mi pomógł problem, w tym że nie znam się na skryptach.
Oto co znalazłem :
/*
Script to spawn the yomies at the desired location.
Called from within a spawn area trigger.
*/
private ["_cnt","_sizeInc","_spawnOff","_spawnOn","_spawn","_spawnN","_yomies","_bSpawn","_spawnIndex","_spawnMode","_spawnPos","_spawnSize","_spawnTypes","_yomie","_yomieGrp","_yomiePos","_yomieType"];
_spawnIndex = _this select 0;
_spawnTypes = _this select 1;
// check whether the spawn is enabled
_bSpawn = format ["bSpawn%1", _spawnIndex];
if (isNil _bSpawn) exitWith {};
_spawnOn = format["SpawnOn%1", _spawnIndex];
_spawnOff = format["SpawnOff%1", _spawnIndex];
// we can't proceed while this spawn's process of deleting yomies is still running
waitUntil {isNil _spawnOff};
_spawn = (Spawns select _spawnIndex) select 0;
_spawnN = compile format ["SpawnN%1", _spawnIndex];
_yomies = compile format ["Yomies%1", _spawnIndex];
_spawnMode = call compile format ["SpawnMode%1", _spawnIndex];
_spawnPos = getPos _spawn;
_spawnSize = (Spawns select _spawnIndex) select 1;
_sizeInc + 0;
// when _spawnMode is set to ONCE, the killed yomies aren't respawning back and
// _spawnN is decreasing with each killed zombie until it reaches zero.
if (call _spawnN < 1) exitWith {
deleteVehicle _spawn;
Spawns set [_spawnIndex,objNull];
call compile format ["iSpawn%1on=nil", _spawnIndex];
};
_cnt = 0;
while {_spawnMode == 'INFINITE' or _cnt == 0 } do {
scopeName "spawn";
while {count call _yomies < (call _spawnN)} do {
// get random position where to spawn the new yomie
_yomiePos = [0,0,0];
_sizeInc = 0;
while {surfaceIsWater _yomiePos || ({alive _x && _yomiePos distance _x < iViewDist*(1-fog)} count aPlayers) > 0} do {
_yomiePos = [(_spawnPos select 0) + (_spawnSize+_sizeInc) - random((_spawnSize+_sizeInc)*2),(_spawnPos select 1) + (_spawnSize+_sizeInc) - random((_spawnSize+_sizeInc)*2)];
sleep 0.05;
if (isNil _bSpawn or not isNil _spawnOff) then {
breakOut "spawn"
};
_sizeInc = _sizeInc + 25;
};
//_m = createMarker [format["m%1_%2", _spawnIndex, _cnt], _yomiePos]; _m setMarkerType "dot";
// spawn the yomie
_yomieType = call compile format["aYClass%1 select (floor random count aYClass%1)", _spawnTypes select (floor random count _spawnTypes)];
_yomie = [_yomiePos,_yomieType,_spawnIndex] call fSpawnYomie;
if (not isNull _yomie) then {
_cnt =_cnt + 1;
};
Sleep 0.05;
};
sleep 0.3;
};
// let the 'spawn logic' know that spawning process has ended
call compile format["SpawnOn%1=nil", _spawnIndex];
http://5133p39.wz.cz/yomies/?docs
Jak by ktoś wiedział gdzie co wpisać ,proszę o pomoc.
Bardzo był bym wdzięczny.
Pzdr.
Mam troszku duży problem :/
Pobrałem addons z yomies'ami no i jak zawsze edytor i do roboty.
Chciałbym żeby się respawnowały lecz template od cooby nie pomogło.
Zato w adonns znalazłem tekst który prawdopodobnie by mi pomógł problem, w tym że nie znam się na skryptach.
Oto co znalazłem :
/*
Script to spawn the yomies at the desired location.
Called from within a spawn area trigger.
*/
private ["_cnt","_sizeInc","_spawnOff","_spawnOn","_spawn","_spawnN","_yomies","_bSpawn","_spawnIndex","_spawnMode","_spawnPos","_spawnSize","_spawnTypes","_yomie","_yomieGrp","_yomiePos","_yomieType"];
_spawnIndex = _this select 0;
_spawnTypes = _this select 1;
// check whether the spawn is enabled
_bSpawn = format ["bSpawn%1", _spawnIndex];
if (isNil _bSpawn) exitWith {};
_spawnOn = format["SpawnOn%1", _spawnIndex];
_spawnOff = format["SpawnOff%1", _spawnIndex];
// we can't proceed while this spawn's process of deleting yomies is still running
waitUntil {isNil _spawnOff};
_spawn = (Spawns select _spawnIndex) select 0;
_spawnN = compile format ["SpawnN%1", _spawnIndex];
_yomies = compile format ["Yomies%1", _spawnIndex];
_spawnMode = call compile format ["SpawnMode%1", _spawnIndex];
_spawnPos = getPos _spawn;
_spawnSize = (Spawns select _spawnIndex) select 1;
_sizeInc + 0;
// when _spawnMode is set to ONCE, the killed yomies aren't respawning back and
// _spawnN is decreasing with each killed zombie until it reaches zero.
if (call _spawnN < 1) exitWith {
deleteVehicle _spawn;
Spawns set [_spawnIndex,objNull];
call compile format ["iSpawn%1on=nil", _spawnIndex];
};
_cnt = 0;
while {_spawnMode == 'INFINITE' or _cnt == 0 } do {
scopeName "spawn";
while {count call _yomies < (call _spawnN)} do {
// get random position where to spawn the new yomie
_yomiePos = [0,0,0];
_sizeInc = 0;
while {surfaceIsWater _yomiePos || ({alive _x && _yomiePos distance _x < iViewDist*(1-fog)} count aPlayers) > 0} do {
_yomiePos = [(_spawnPos select 0) + (_spawnSize+_sizeInc) - random((_spawnSize+_sizeInc)*2),(_spawnPos select 1) + (_spawnSize+_sizeInc) - random((_spawnSize+_sizeInc)*2)];
sleep 0.05;
if (isNil _bSpawn or not isNil _spawnOff) then {
breakOut "spawn"
};
_sizeInc = _sizeInc + 25;
};
//_m = createMarker [format["m%1_%2", _spawnIndex, _cnt], _yomiePos]; _m setMarkerType "dot";
// spawn the yomie
_yomieType = call compile format["aYClass%1 select (floor random count aYClass%1)", _spawnTypes select (floor random count _spawnTypes)];
_yomie = [_yomiePos,_yomieType,_spawnIndex] call fSpawnYomie;
if (not isNull _yomie) then {
_cnt =_cnt + 1;
};
Sleep 0.05;
};
sleep 0.3;
};
// let the 'spawn logic' know that spawning process has ended
call compile format["SpawnOn%1=nil", _spawnIndex];
http://5133p39.wz.cz/yomies/?docs
Jak by ktoś wiedział gdzie co wpisać ,proszę o pomoc.
Bardzo był bym wdzięczny.
Pzdr.
Re: Respawn yomies
Na czerwono sam napisałeś link, w którym jest dokumentacja
Re: Respawn yomies
Kurcze ja wiem tylko tak jak to powiedziałem wcześniej, nic nie wiem
Chociaż dobrze wpisałem?
Powinno być coś jeszcze?
To create a zombie spawn area, place marker at the desired location
First marker must be named 'yomie_spawn', while all additional markers must be named 'yomie_spawn_1', 'yomie_spawn_2', 'yomie_spawn_3', etc.
^^^^^^^^^^^^^^
Tak się ma nazywać marker czy wyzwalacz ?
Type and number of zombies to spawn, is determined by marker text
It must be in the form of array definition, where the first element is the number of zombies to spawn, and any other elements specify the types of the zombies.
For example, if you put [50,'C','R'] into the marker text field, the spawn area will create 50 zombies consisting of random Civilian and RACS class types.
^^^^^^^^^^^^^^^^^^
To wpisać do tekstu markera/ wyzwalacza.
i tylko tyle ?
To disable spawn area use:
call compile format ["bSpawn%1=nil", _i];
To enable spawn area use:
call compile format ["bSpawn%1=true", _i];
^^^^^^^^^^^^^^^^^
do czego to służy ?
Chociaż dobrze wpisałem?
Powinno być coś jeszcze?
To create a zombie spawn area, place marker at the desired location
First marker must be named 'yomie_spawn', while all additional markers must be named 'yomie_spawn_1', 'yomie_spawn_2', 'yomie_spawn_3', etc.
^^^^^^^^^^^^^^
Tak się ma nazywać marker czy wyzwalacz ?
Type and number of zombies to spawn, is determined by marker text
It must be in the form of array definition, where the first element is the number of zombies to spawn, and any other elements specify the types of the zombies.
For example, if you put [50,'C','R'] into the marker text field, the spawn area will create 50 zombies consisting of random Civilian and RACS class types.
^^^^^^^^^^^^^^^^^^
To wpisać do tekstu markera/ wyzwalacza.
i tylko tyle ?
To disable spawn area use:
call compile format ["bSpawn%1=nil", _i];
To enable spawn area use:
call compile format ["bSpawn%1=true", _i];
^^^^^^^^^^^^^^^^^
do czego to służy ?
Re: Respawn yomies
Podpowiem, że "marker" znaczy marker.Punky pisze: To create a zombie spawn area, place marker at the desired location
...
Tak się ma nazywać marker czy wyzwalacz ?
chyba, ale musisz stworzyć swoją misję na bazie "yomies basic template"Punky pisze: To wpisać do tekstu markera.
i tylko tyle ?
Re: Respawn yomies
E tylko że yomies basic template działa na wersji 1.08
Zresztą zobacz sam. Właczy się tylko misja a na edytorze pusto
Zresztą zobacz sam. Właczy się tylko misja a na edytorze pusto
Re: Respawn yomies
A Ty masz jaką wersję army? Ostatni oficjalny patch to chyba 1.14
PS: żeby się coś uruchomiło w misji nie potrzeba wyzwalacza, czy jakiegoś pola inicjalizacyjnego w jakiejś jednostce - można użyć init.sqf/sqs, który wykonuje się automatycznie na początku misji i być może autorzy template'u tam właśnie umieścili wymagane rzeczy.
PS: żeby się coś uruchomiło w misji nie potrzeba wyzwalacza, czy jakiegoś pola inicjalizacyjnego w jakiejś jednostce - można użyć init.sqf/sqs, który wykonuje się automatycznie na początku misji i być może autorzy template'u tam właśnie umieścili wymagane rzeczy.
Re: Respawn yomies
Posiadam 1.14
Wpisałem w wyzwalaczu this exec "init.sqs" bo jest w głownym folderze misji.
Zombi'aki już działają respawnują się w określonych miejsach lecz nie zadają obrażeń.
Wpisałem w wyzwalaczu this exec "init.sqs" bo jest w głownym folderze misji.
Zombi'aki już działają respawnują się w określonych miejsach lecz nie zadają obrażeń.