viel.kuul.10
-
Content Count
47 -
Joined
-
Last visited
-
Medals
Posts posted by viel.kuul.10
-
-
How to change that icon of group above icon of unit in Zeus? For example in BLUFOR, the icon or something is blue, and I would like to place a logo. I know about squad.xml but I would like to put custom logo regardless of whether it is player or AI. I believe it is possible by a script but how?
-
I just tested. Does not work.
-
20 hours ago, RCA3 said:It might just not work. But add it anywhere on init.sqf. Excluded from your code (outside scope { }).
So I did. Does not work. I don't understand why the group is automatically deleted when it is killed.
-
18 hours ago, RCA3 said:Try adding this outside the scope of your other script. On init.sqf
addMissionEventHandler ["GroupCreated", { params ["_group"]; _group deleteGroupWhenEmpty false; }];
Can you show where your code should be in my code? I tried it a couple of times and it doesn't work.
-
Why haven't I received an answer yet? I hope they don't hold anything against me.
-
19 hours ago, Harzach said:...the group is automatically deleted.
It seems.hHow to save the results, especially after the battle? I would like that to always show the results once the whole group is killed. The same thing is also with individual vehicles
-
This code works perfectly if only a couple of soldiers in one group are killed. But when an entire group is killed, the code doesn't work. Like as if that group had never been spawned. I'm trying to figure out where the problem is. I guess I might get an answer.
-
On 6/17/2022 at 9:33 AM, sarogahtyp said:This is your answer:
just delete those while do loops. its not needed in your case and it should be the issue for your 2nd radio trigger not working!
It works. Thanks!
-
Why I have no answers?
-
22 hours ago, Harzach said:It does indeed work. In fact,
This, however:
is new information.
So perhaps you should explain exactly how you want this to go.
All I want to know is simple, I would like to see the results of dead soldiers and destroyed vehicles after a battle but which I would activate myself, i.e. to see statistics whenever I want. I would also like to see the current number of living soldiers and vehicles.
I have four triggers, every via radio (Alpha, Bravo, Charlie, Delta).
First trigger:
_count = {side _x == east} count allunits;
hintSilent format ["Alive CSAT Units: %1", _count];Second trigger:
0 = [] spawn { while {true} do { sleep 0.1; _csatScore = {getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "side") == 0} count allDeadMen; hintSilent format ["Dead CSAT Units: %1", _csatScore]; }; };
Third trigger:
_count = {side _x == resistance} count allunits;
hintSilent format ["Alive AAF Units: %1", _count];Fourth trigger:
0 = [] spawn { while {true} do { sleep 0.1; _aafScore = {getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "side") == 2} count allDeadMen; hintSilent format ["Dead AAF Units: %1", _aafScore]; }; };
20 hours ago, mr_centipede said:Are you perhaps trying to do something like this?
That's something I'm actually looking for. Men, vehicles, vessels, aircraft, on every side. I'm currently testing this your, I'm playing with mod Arma Commander, the trigger is synced with the main module of the mod. But after the mission, this briefing is not shown.
-
Does not work. It shows the result nicely but when I activate another radio, it doesn't work anymore. I have four triggers.
-
After trying for weeks with my scripting and googling everything to find some answers, I am still without success. The script should be small and simple, I knew scripting isn’t easy but I can’t believe this hurts so much. I'm trying to make a script that will count all the dead units and destroyed vehicles of one side and put it in the trigger and activate it via radio.
_count = {side _x == resistance} count allunits;
hintSilent format ["Alive AAF Units: %1", _count]; // Count all alive units of Resistance side, it works fine.0 = [] spawn {while {true} do {sleep 0.1;}
_aafScore = {getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "side") == 2} count allDeadMen;
hintSilent format ["Dead AAF Units: %1", _aafScore]}; // Count all dead units but it works not fine. -
Works this with a group. I gave you a trophy.
Earlier I tested with a turret and a vehicle, every works with that code in the first posts. Only I would like the group to be together with the turret, not just one AI, I usually set up several more AI in the same group. To protect the turret or to replace staff if they die. I realized that any AI that is located in a turret or vehicle, spawns normally but an AI that is outside of a turret or vehicle has to run a long way to find its leader.
I'm definitely still learning to scripting. Your codes can help me. I visit community.bistudio.com/wiki often to learn. Of course, I’m going to look at the other links they left here.
-
How do that with a group, not just one AI? Along with some turret, for example: HMG?
-
Does not work. If I manually turn the soldier in the desired direction, it spawn in that direction.
I am always wishful to learn scripting.
-
It works. I bow to you.
I have a question: how to implant direction to this code? Random or selected?
-
How to make a unit (or more units) start at a random position within a marker? I have a simple code for random select markers, but I don't have for radius, direction.
this setpos (getMarkerPos (selectRandom ["marker1", "marker2"]));
This code I put in a unit init. I don't like sqf.
I am trying: this setpos getMarkerPos ["marker1", "marker2"] getPos [random(40), random(360). random(40) is radius. But doesn't works.
-
I managed to split this script into three parts or three hints individually.
SpoileraddMissionEventHandler ["entityKilled",{
params ["_unit"];
private _grp = group _unit;
private _side = side _grp;
private _type = getText (configOf _unit / "displayName");
if (isNil {_grp getVariable "dataKilled"}) then {
_grp setVariable ["dataKilled",[[_side,_type,0]]];
} else {
if !([_side,_type] in ((_grp getVariable "dataKilled") apply {[_x#0,_x#1]})) then {
(_grp getVariable "dataKilled") pushBack [_side,_type,0];
};
};
private _idx = (((_grp getVariable "dataKilled") apply {[_x#0,_x#1]}) find [_side,_type]);
private _cnt = (_grp getVariable "dataKilled") #_idx#2;
(_grp getVariable "dataKilled") set [_idx, [_side,_type,_cnt +1]];
}];
[] spawn {
while {true} do {
waitUntil {sleep 1; triggerActivated trig1};
private _txtWEST = "DEAD HELLENIC UNITS ";{
_grp = _x;
{
_x params ["_side","_type","_cnt"];
call {
if (_side isEqualTo WEST) exitWith {
if !(str _grp in str _txtWEST) then {
_txtWEST = composeText [_txtWEST,lineBreak,str _grp]
};
_txtWEST = composeText [_txtWEST,' ' +_type + ' ' + str _cnt];
};};
} forEach (_grp getVariable "dataKilled");
} forEach (allGroups select {!isNil {_x getVariable "dataKilled"}});
if (_txtWEST isEqualTo "DEAD HELLENIC UNITS ") then {_txtWEST = "DEAD HELLENIC UNITS: 0 casualty"};hint composeText [_txtWEST];
waitUntil {sleep 1; !triggerActivated trig1};
};
};
[] spawn {
while {true} do {
waitUntil {sleep 1; triggerActivated trig2};private _txtEAST = "DEAD TURKISH UNITS ";
{
_grp = _x;
{
_x params ["_side","_type","_cnt"];
call {if (_side isEqualTo EAST) exitWith {
if !(str _grp in str _txtEAST) then {
_txtEAST = composeText [_txtEAST,lineBreak,str _grp]
};
_txtEAST = composeText [_txtEAST,' ' +_type + ' ' + str _cnt];
};};
} forEach (_grp getVariable "dataKilled");
} forEach (allGroups select {!isNil {_x getVariable "dataKilled"}});if (_txtEAST isEqualTo "DEAD TURKISH UNITS ") then {_txtEAST = "DEAD TURKISH UNITS: 0 casualty"};
hint composeText [_txtEAST];
waitUntil {sleep 1; !triggerActivated trig2};
};
};
[] spawn {
while {true} do {
waitUntil {sleep 1; triggerActivated trig3};private _txtINDEP = "DEAD MAIDEN UNITS ";
{
_grp = _x;
{
_x params ["_side","_type","_cnt"];
call {if (_side isEqualTo INDEPENDENT) exitWith {
if !(str _grp in str _txtINDEP) then {
_txtINDEP = composeText [_txtINDEP,lineBreak,str _grp]
};
_txtINDEP = composeText [_txtINDEP,' ' +_type + ' ' + str _cnt];
};
};
} forEach (_grp getVariable "dataKilled");
} forEach (allGroups select {!isNil {_x getVariable "dataKilled"}});if (_txtINDEP isEqualTo "DEAD MAIDEN UNITS ") then {_txtINDEP = "DEAD MAIDEN UNITS: 0 casualty"};
hint composeText [_txtINDEP];
waitUntil {sleep 1; !triggerActivated trig3};
};
}; -
On 4/30/2021 at 6:45 AM, beno_83au said:Into where, and how? This is the problem. No one knows where you've added _entity, but if you have only added it in the EntityKilled EH, then all _entity is doing is defining the killer. Which is what myself and Pierre have explained.
SpoileraddMissionEventHandler ["entityKilled",{
params ["_unit", "_entity"];
private _grp = group _unit;
private _side = side _grp;
private _type = getText (configOf _unit / "displayName");
if (isNil {_grp getVariable "dataKilled"}) then {
_grp setVariable ["dataKilled",[[_side,_type,0]]];
} else {
if !([_side,_type] in ((_grp getVariable "dataKilled") apply {[_x#0,_x#1]})) then {
(_grp getVariable "dataKilled") pushBack [_side,_type,0];
};
};
private _idx = (((_grp getVariable "dataKilled") apply {[_x#0,_x#1]}) find [_side,_type]);
private _cnt = (_grp getVariable "dataKilled") #_idx#2;
(_grp getVariable "dataKilled") set [_idx, [_side,_type,_cnt +1]];
}];
[] spawn {
while {true} do {
waitUntil {sleep 1; triggerActivated trigEnd};
private _txtWEST = "DEAD NATO UNITS ";
private _txtEAST = "DEAD OPFOR UNITS ";
private _txtINDEP = "DEAD GREEK UNITS ";
{
_grp = _x;
{
_x params ["_side","_type","_cnt"];
call {
if (_side isEqualTo WEST) exitWith {
if !(str _grp in str _txtWEST) then {
_txtWEST = composeText [_txtWEST,lineBreak,str _grp]
};
_txtWEST = composeText [_txtWEST,' ' +_type + ' ' + str _cnt];
};
if (_side isEqualTo EAST) exitWith {
if !(str _grp in str _txtEAST) then {
_txtEAST = composeText [_txtEAST,lineBreak,str _grp]
};
_txtEAST = composeText [_txtEAST,' ' +_type + ' ' + str _cnt];
};
if (_side isEqualTo INDEPENDENT) exitWith {
if !(str _grp in str _txtINDEP) then {
_txtINDEP = composeText [_txtINDEP,lineBreak,str _grp]
};
_txtINDEP = composeText [_txtINDEP,' ' +_type + ' ' + str _cnt];
};
};
} forEach (_grp getVariable "dataKilled");
} forEach (allGroups select {!isNil {_x getVariable "dataKilled"}});
if (_txtWEST isEqualTo "DEAD NATO UNITS ") then {_txtWEST = "DEAD NATO UNITS: 0 casualty"};
if (_txtEAST isEqualTo "DEAD OPFOR UNITS ") then {_txtEAST = "DEAD OPFOR UNITS: 0 casualty"};
if (_txtINDEP isEqualTo "DEAD GREEK UNITS ") then {_txtINDEP = "DEAD GREEK UNITS: 0 casualty"};
hint composeText [_txtWEST,lineBreak,_txtEAST,lineBreak,_txtINDEP];
waitUntil {sleep 1; !triggerActivated trigEnd};
};
};How can I divide this script into three parts? Each side with its own hint? The hint doesn’t load whole because it’s too long, especially after a big battle.
-
Hey, I don't want to argue. I wrote everything clearly here what I want in the game. So it's not clear to me what's not clear to you, lol. I asked something so if you don’t want to help, then you don’t have to.
I put _entity in this script to recognize the vehicles when they spawn.
-
On 4/19/2021 at 8:28 PM, pierremgi said:https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EntityKilled
the second param of this MEH refers to the killer. So your.... _entity.
https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EntityRespawned
On 4/19/2021 at 8:28 PM, pierremgi said:https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EntityKilled
As usual, I'm not sure to understand your approach.
Really? I speak English, not Chinese! I feel like I'm talking to an alien.
On 4/19/2021 at 8:28 PM, pierremgi said:The MEH I gave you is just fine. What you have to do, (not me), is to treat your groups and manage your trigger hints. I gave you an example, but, as usual, there are extra inputs. It's endless... (til I decide it's over as far as I'm concerned).
As usual you avoid answering my questions directly.
-
19 hours ago, pierremgi said:Probably because you are spawning these groups (spawned vehicles) after the trigger activation and before the trigger deactivation. I don't know what is your condition for spawning some vehicles. So, you can split the loop (i wrote) into two spawned loops, one for treating the groups, another one for trigger activation/hint/trigger deactivation.
Try to do that yourself. It's a good exercise.
I think I have already solved this by incorporating _entity among the params. Now this looks like this: params ["_unit", "_entity"];
Which is the event among the addMissionEventHandler that helps count all living units? Can you help me?
-
I have tested that with the vehicles. Scripts work when it comes to only vehicles that are already located in a terrain but do not recognize those that have spawned.
-
It works, thanks! I'll get back later when I test that with the vehicles.
If I’m not asking too much, can you embed a script about all living units in this existing script?
Change something in Zeus
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Bump...