CBA_A3 icon indicating copy to clipboard operation
CBA_A3 copied to clipboard

CBA_fnc_addPerFrameHandler not working in 3DEN

Open Freddo3000 opened this issue 4 years ago • 8 comments

Mods (complete and add to the following information):

  • Arma 3: 1.98
  • CBA: 3.15.1.200418 stable

Description: CBA perFrameHandler system isn't active in 3DEN

Steps to reproduce:

  • Go into editor
  • Open debug console
  • Run any of the following
    • CBA_fnc_addperFrameHandler
    • CBA_fnc_execNextFrame
    • CBA_fnc_waitUntilAndExecute
    • CBA_fnc_waitAndExecute (time = 0)
    • etc
  • Note that they do not evaluate

Expected behavior: The above functions, and all other functions that rely on CBA perFrameHandlers, to execute in 3DEN.

Where did the issue occur?

  • 3DEN Editor (not preview)

Log Files: https://gist.github.com/Freddo3000/d918ed7916d3fa98c473cffa206cf287

Additional context: This is caused by addMissionEventHandler ["EachFrame", {call FUNC(onFrame)}]; being in postInit instead of preInit. Executing it manually in the debug console resolves the issue.

I'd move it to preInit, and have CBA_missionTime set to start in postInit.

Freddo3000 avatar Jul 12 '20 11:07 Freddo3000

I'd move it to preInit, and have CBA_missionTime set to start in postInit.

No.

commy2 avatar Jul 12 '20 19:07 commy2

No to which part of the question and why?

jonpas avatar Jul 12 '20 19:07 jonpas

No to moving PFH et al to preInit. That would break a lot of things.

commy2 avatar Jul 13 '20 15:07 commy2

Might be worth mentioning in the listed functions then, that it does not work during preInit and as such does not work in briefing and 3DEN. Would it otherwise be possible to make an exception for 3DEN at least?

Freddo3000 avatar Jul 13 '20 19:07 Freddo3000

You cannot tell that you are in 3den in preInit, as the is3DEN command is bugged in preInit.

commy2 avatar Jul 14 '20 02:07 commy2

as the is3DEN command is bugged in preInit.

do you have a FT ticket for that? Its not noted on biki or anywhere

dedmen avatar Jul 14 '20 08:07 dedmen

I gave up on documenting bugs on the wiki.

commy2 avatar Jul 14 '20 15:07 commy2

Is is3DEN still bugged in preInit?

jonpas avatar Sep 07 '23 13:09 jonpas

I'll fold this into #1613 although this has been opened for longer. #1613 comes with a linked PR.

jonpas avatar Apr 03 '24 14:04 jonpas