Closed markooff closed 2 months ago
In addition - info : The adding of FRIES module works only before the helicopter is deleted - because it has a phraze : [this] call ace_fastroping_fnc_equipFRIES; in his init field - and it works well (but only once). After the helicopter respawn - the situation is as I described above ... I think about some stupid errors in the invocations of CBA_fnc_addClassEventHandler - but there are any of them, because I've checked this invocation in CBA github exapmles - and it is correct. So the question is - why the FRIES module behaves that way ?
When using the CBA_fnc_addClassEventHandler
method, you have to also delete the init box line.
equipFRIES
has global effcts. You have placed the code in an init box or added the InitPost class event handler on every machine (init.sqf). Those script instance are executed on every machine. Both are wrong, because you must not execute commands and functions with global effects on every machine. The function must only be executed on one machine.
If you want to use the init.sqf method, then you have to delete the init box entry of the vehicle in the editor and place this into init.sqf:
// init.sqf
if (isServer) then {
["<classname_helicopter>", "initPost", {
params ["_heli"];
_heli call ace_fastroping_fnc_equipFRIES;
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
};
I don't think any of this has changed in the last few years.
OK, I've tested the method , You described above, (I've cleaned up the init field of the helicopter and pasted the code from above to my init.sqf. Then I've started the mission in the MP environment) But it produced the same effect, i.e. everything worked well until the respawn of the helicopter. Then in spite of the visually effect of adding visible FRIES mechanism , there were no possibilities to use it . You can take a look of the two screens I've made during tests (both were taken AFTER helicopter has respawned) : http://markooff.net/obrazki/ACE3/bugs_and_features/FRIES_problem/Arma3_x64_2019-03-13_14-48-17-89.jpg http://markooff.net/obrazki/ACE3/bugs_and_features/FRIES_problem/Arma3_x64_2019-03-13_14-48-35-23.jpg And here there are screens taken at the start of the mission (I have to restart mission from scratch) just after the first spawn of my character (before the helicopter was destroyed and respawned) : http://markooff.net/obrazki/ACE3/bugs_and_features/FRIES_problem/Arma3_x64_2019-03-13_14-57-31-36.jpg http://markooff.net/obrazki/ACE3/bugs_and_features/FRIES_problem/Arma3_x64_2019-03-13_14-57-38-67.jpg There is - how it should work normally - you should to have a possibility to use the FRIES mechanism with ACE_interaction_menu as a normal playing character just from inside the heli....
Please upload an RPT file.
Here You've got ! :) Arma3_x64_2019-03-13_20-26-52.zip
I checked the vehicle respawn module and BI broke it completely.
This is what they do:
//--- Copy all variables across from the old vehicle to the new one
{
_newVeh setVariable [_x, _veh getVariable _x];
}
forEach allVariables _veh;
They copy all variables from the wreck to the new vehicle now. This breaks pretty much every script on the respawned vehicles.
My advice is to drop the vehicle respawn module.
OK, I understand it , but - what should I use instead of the original BI veh_respawn module - for proper respawn the helicopter with all functionalities it has - and other machines/cars/vehicles on the whole map ( as you can probably see - this little mission is only 'script testing' one for a greater project [Manhunt] which I'm still working on ) ? What do You suggest ?
The only thing you can do is to script this yourself using a Killed event handler and createVehicle.
I understand, to make it more clear - could I use an Event Scripting options and fields in Enhanced Eden mod (which I use normally) ? Is it right ? Or I should only add to the init field of the Helicopter script when I use event handler Killed as a condition and a createVehicle as a function (of course with proper invocation and parameters) ? And after that - the deleteVehicle (old vehicle) ...
I think either would work, but I have never used Enhanced Eden.
Thank You , very much for a quick and essential help in my problem. I'll do it by myself . And , of course I'll write if the 3den Enhanced Event Scripting module can do the job also . If in the future I have a question connected with this issue , I will ask You :)
@commy2 - if I may ask You for a bit help - I have another question :
if (isServer) then { ["<classname_helicopter>", "initPost", { params ["_heli"]; _heli call ace_fastroping_fnc_equipFRIES; }, nil, nil, true] call CBA_fnc_addClassEventHandler; };
and all that pieces of code - are storedin the init.sqf file ?
(of course not all classes have only FRIES but there are some which have athe parameters (like cargo_size.space etc) altered that way ). What is in your opinion - the limit of resonably using that sort of modification of the classes ? I've searched the solutions or advices for that problem but I've finded nothing special about it ..
That's off topic to this issue. You'd be better of discussing this on the ACE Slack.
The performance impact of an Init event script depends entirely on the function you execute. For ace_fastroping_fnc_equipFRIES
it is negligible. For ace_medical_fnc_init
it is, in my opinion, not (and this is entirely because of the relatively huge number of setVariable public
uses).
The impact of the event handler itself is negligible and so is adding the events at the mission start (init.sqf).
Thank You for the answer, @commy2 Of course - I've meant the commands/features like : ace_draggable, ace_carryable, ace_cargo_space, ace_cargo_size and so on. Not the whole frameworks (like ace_medical framework ) I need to make these changes to complete my own 'logistic system' (for use by my own Group ) which they will be the parts of.
OK, I've registered on ACE3 Slack . but which channel should be good enough to continue this conversation ?
Reopen, because the issue persists.
Only on topic replies below this post please.
I have some new informations in this issue . During our sewere tests of PGM logistic system ( http://pgm.armaonline.pl/forum/viewtopic.php?f=53&t=532&p=7605&sid=73305a03e7d39854d13c5704e41ec0cc#p7605 ) I've found that this problem ONLY affects helicopter classes of UH-1 and similiar. But it looks like it NOT affects other classes - such as CH-53 CH-47 and so on . After helicopters of these classes are destroy and they are respawned (using standard BI respawn/vehicle module ) the FRIES mechanism not only seems to working well , but it REALLY WORKS WELL ....
So, maybe it isn't a trully problem of BI-respawn-bug ... ?
It is. They are copying all variables from the wreck to the respawned object. Even variables from ACE that don't belong on the respawned object. This is probably some misguided attempt to fix issues they have with something else, but it is insanely stupid if you know anything about programming, because it breaks pretty much every script.
All vehicles created by the BI Respawn Module after 1.90 are compromised and behave unexpectedly. There is no point in finding patterns by trial and error here. The only solution is to revert the change in the BI respawn module - or to avoid using it.
OK, so, I think about the solution for an ordinary players/mission-makers - which may help them to avoid such problems with vehicle respawning . What do you think about the possibility for creating an extra respawn module in the ACE3 mod addon structure ?
I hope if You (as the ACE3DevTeam) can handle it - it will be much more better than any BI solutions that sort. Safe and fully customisable ....
Could the FRIES variables be wiped from the destroyed chopper with a handleKilled
function as with many other modules ?
It's just a workaround, but should work ....
Won't help. The variables are copied over by a scheduled BI script. Don't use the vehicle respawn module. It is as simple as that. By copying random variables, BI broke it, and they have no intention to fix it, because they lack awareness of this being a problem, not only for this feature, but for anything in general.
Information from the last ...few months of using FRIES (im my mod also ) - and a kinda solution of this is - that all problems with ropes and using them CAN be solved manually - when You first (using the Zeus menu) remove FRIES from the previously configured vehicle completely AND THEN add it once again !
Now all FRIES functions should work properly ....
Arma 3 Version:
1.90
(stable) CBA Version:3.9.1
(stable) ACE3 Version:3.12.5
(stable)Mods:
Description:
// rewritted from previously closed ticket https://github.com/acemod/ACE3/issues/4072#issuecomment-471826623 I've just tried using of the method with the ["", "initPost", ace_fastroping_fnc_equipFRIES, nil, nil, true] call CBA_fnc_addClassEventHandler;
in my init.sqf file , but I've got a strange effect
Or, maybe , am I wrong ?
Steps to reproduce:
Prepare basic mission MP in the editor
place a UH1Y Unarmed
make a respawn (veh_resp) for him. Sync the resp_module with the helicopter
in the init field of the helicopter insert the statement :
place a character to check it out (+ ew. make him Game Master - for quickly destroying , or creating enemy who destroy the helicopter)
RUN the mission in Multiplayer mode (or copy it to standalone MP server and then RUN )
Using the character You've created check the possibility to use the FRIES module (with the ACE INTERACTION menu ) when you're inside the chopper (on passenger seat)
then destroy it (f.e. using the enemy char for avoiding negative punishment for destroying your own equipment)
wait for the helicopter to respawn
after it is respawned jump in (as the passenger ) and then check - if you can use FRIES module with you ACE INTERACTION menu ....
Where did the issue occur?
Additional information:
RPT log file: // there is NO rpt file