-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't add actions to main class #2576
Comments
Try it with |
Same result |
Oh yes. Checked the code and |
Could it be changed? |
Not that easily. But you really don't need it on base classes. Here is how we do it: ACE3/addons/cargo/CfgEventHandlers.hpp Lines 20 to 25 in 45e4425
You just have to make sure that the action is only added to each vehicle type once if you place multiple copies of one type: ACE3/addons/cargo/functions/fnc_initVehicle.sqf Lines 37 to 41 in 45e4425
If this is for a mission, then you can simply put the |
I'm gonna check it later, ty commy! Side question, in this way i can add an action to every object and to every class. What's the best option for performance? I don't know how the action system work, so i can't judge |
It should make no noticable difference. |
It's minor, but I think it's slightly faster to add to class. Plus you have less total variables on each object |
Thank you guys, it works perfectly now! |
yay |
Sorry Commy to bring it up again, but i've a problem with your solution. It works perfectly in SP editor, but not in MP.
btc_fnc_eh_unit_init:
|
When is init.sqf runs at different times in SP and MP |
called by init.sqf All the units are spawned during the game |
|
i think you need to use this
|
nope, i've tried to define it inside the same fnc and it's not working
|
*not working |
Few more tests:
type has been added to if i spawn a sleep the action will be added correctly:
But sometime the action is not added even if the type has been added to the main array. I tried to check the actions of the class and this is the result:
The class was |
Description.ext:
btc_fnc_eh_unit_init.sqf:
This works in SP and MP |
@PabstMirror dont work you must use Extended_Init_EventHandlers |
still not working for me. |
https://github.com/jokoho48/AWPublicMission/blob/DCGAW/data/SEN_XEH.hpp#L9-L15 |
It fails on some units class and i can't reproduce the error. I'm gonna change approach |
the unit classes where it fail are not compatible with CBA XEH than you must contact the author of the mod and say him to fix this |
Arma vanilla units. Guerilla opfor faction. Units spawned with zeus are fine tho (CSAT) |
did you load RHS? |
yep! CBA, ACE, RHS |
then try it without RHS because RHS break CBA XEH |
It seems that i can not attach an action to a main class, like LandVehicle, the same action works for a defined class:
_action = ["Logistic","Logistic","",{hint "CIAO"},{true}] call ace_interact_menu_fnc_createAction; ["LandVehicle", 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToClass;
//////////////////////////////////////////////////////////////////////////
_action = ["Logistic","Logistic","",{hint "CIAO"},{true}] call ace_interact_menu_fnc_createAction; ["B_Truck_01_transport_F", 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToClass;
The text was updated successfully, but these errors were encountered: