Ansible2 / Ansible2/Arma-3-Survival

Help needed creating a special wave....

Aperta
#472 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
SQF
Stelle
21
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I need help in making giant soldiers & mini soldiers. Here is the code that works in the editor:
```
["STpopulation","onEachFrame", {
{
{
if (local _x && simulationEnabled _x) then {
if (isNil {_x getVariable "tall"}) then {
_x setVariable ["tall" , 1 + ((random 0.3^1.4)* selectRandom [-1,1.2]) ,TRUE];
};
_x setObjectScale (_x getVariable ["tall",1])
};
} forEach units _x;
} forEach allGroups;
}] call bis_fnc_addStackedEventHandler;
```
![image](https://user-images.githubusercontent.com/21357927/115099657-a9e33b80-9f7a-11eb-8893-27675421eac7.png)

Here is my new wave. The soldiers spawn in, but have no size difference (see start Giant):

```
/* ----------------------------------------------------------------------------
Function: BLWK_fnc_createSuicideWave

Description:
creates the suicide bombers and sends them towards The Crate

Executed from "BLWK_fnc_handleSuicideWave"

Parameters:
0: _unitsToWorkWith : - Units to potentially turn into bombers

Returns:
NOTHING

Examples:
(begin example)

[unitsArray] call BLWK_fnc_createSuicideWave;

(end)

Author(s):
Hilltop(Willtop) & omNomios,
Modified by: Ansible2 // Cipher
---------------------------------------------------------------------------- */
params ["_unitsToWorkWith"];

private _numberOfBombers = round (count _unitsToWorkWith / 4);
private _bombersArray = _unitsToWorkWith select [0,_numberOfBombers];

private "_unitGroupTemp";
_bombersArray apply {
_unitGroupTemp = group _x;
[_unitGroupTemp] call CBAP_fnc_clearWaypoints;
[_unitGroupTemp, BLWK_mainCrate, 5, "MOVE", "CARELESS"] call CBAP_fnc_addWaypoint;

// Start Giant
["giant","onEachFrame", {
_unitGroupTemp = _this #0;
{
{
if (local _x && simulationEnabled _x) then {
if (isNil {_x getVariable "tall"}) then {
_x setVariable ["tall" ,4,TRUE];
};
_x setObjectScale (_x getVariable ["tall",1])
};
} forEach units _x;
} forEach _unitGroupTemp;
},[_unitGroupTemp] ] call bis_fnc_addStackedEventHandler;

//["small_man","onEachFrame", {_x setObjectScale 0.5}, [_unitGroupTemp] ] call BIS_fnc_addStackedEventHandler;

// end Giant
// added suicide uniform
private ["_expl1","_expl2","_expl3"];

removeHeadgear _x;
removeVest _x;
_x addVest "V_HarnessOGL_brn";
_x addHeadgear "H_ShemagOpen_khk";

_expl1 = "DemoCharge_Remote_Ammo" createVehicle position _x;
_expl1 attachTo [_x, [-0.1, 0.1, 0.15], "Pelvis"];
_expl1 setVectorDirAndUp [ [0.5, 0.5, 0], [-0.5, 0.5, 0] ];
_expl2 = "DemoCharge_Remote_Ammo" createVehicle position _x;
_expl2 attachTo [_x, [0, 0.15, 0.15], "Pelvis"];
_expl2 setVectorDirAndUp [ [1, 0, 0], [0, 1, 0] ];
_expl3 = "DemoCharge_Remote_Ammo" createVehicle position _x;
_expl3 attachTo [_x, [0.1, 0.1, 0.15], "Pelvis"];
_expl3 setVectorDirAndUp [ [0.5, -0.5, 0], [0.5, 0.5, 0] ];
// end suicide uniform

};
```
Here is where I have been getting help:
https://forums.bohemia.net/forums/topic/233905-jboy-giant-alpha-video-released-scripts-coming-soon/?page=2

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.