Dynamic code is not the problem, more the bad behaviour of GUI. Gamelinks are actualy Strings, but the Trigger editor treats it as something different.
Fortunately you can trick the TE using Custom Script
String To Actor Gamelink Options: Function Return Type: Game Link - Actor Parameters gamelink = "" <String> Grammar Text: String To Actor Gamelink(gamelink) Hint Text: (None) Custom Script Code Local Variables Actions General - Return lp_gamelink
Note: lp_gamelink is where the Custom Script comes to work
Hope this helps