It seems that the optimizations to code generation delivered by 4.0 are automatically applied to the trigger actions created by GUI.
But in my case I frequently combined GUI actions with custom scripts, where I used some API functions that seem to be obsolete since 4.0 released.
Unlike GUI shit, custom code hasn't been automatically changed to the new standard, so I have to fix it manually.
The first thing I had to fix is:
I have the gui-created "pick each player in a group" loop. And inside that loop I have (amongst other stuff) a custom script, where I manually call PlayerGroupLoopCurrent()
PlayerGroupLoopCurrent() doesn't work anymore.
GUI loop now uses another function PlayerGroupNextPlayer()
So, I added a variable to the trigger, created a new gui action, that assigned (picked player) to my new variable.
And used this variable in the script instead of PlayerGroupLoopCurrent()
And it fixed this particular issue.
But I'm afriad it's not the only issue my map has since 4.0, so I'll put more solutions in this thread.
The second issue is similar:
UnitGroupLoopCurrent() function doesn't work anymore in my custom script that is placed inside a gui created "pick each unit in a group" loop. So, again I had to create a variable, assign (picked unit) to this variable in a gui created action. And then use this variable instead of UnitGroupLoopCurrent() in my custom script.