DaveTheCoder no, config is fine... this seems work
in 3.5 save var(dictionary) root1 to config
var convertName = "res://convertAnims/1Jump.cfg";
if ( b_buttonCFG.is_pressed() ):
var config1 = ConfigFile.new();#------------------------ok
config1.set_value("Player1", "best_score", root1); #----ok
config1.save(convertName);
in 4.0
var convertPathLoad = "res://animConvert/1Jump.cfg";
var convertPathSave = "res://fileSaveInHere/dummy.anim";
# ------------ in fileDialog to save *.anim ------------
func _loadAnim(): #---loads-the-file-from-3.5
var config = ConfigFile.new();
var _err = config.load(convertPathLoad);
var animFile = config.get_value("Player1", "best_score"); #----ok
root1 = animFile;
return( animFile );
func _saveAnim():
var file = FileAccess.open(convertPathSave, FileAccess.WRITE);
file.store_var(root1);
func _on_file_dialog_file_selected(path):
convertPathSave = path; #---write the *.anim name in fileDialog save
_saveAnim();
it shows 27( dictionary ) not 18 anymore
var checkVarPath = "res://fileSaveInHere/1Jump.anim";
if ( buttonTypeOF.is_hovered() ):
if ( Input.is_action_just_pressed('mouse_button') ):
var file = FileAccess.open(checkVarPath, FileAccess.READ);
var content = file.get_var();
bbox.visible = ! bbox.visible;
if ( bbox.visible == true ):
$Label.text = (str(typeof(content))); #--shows-27------------
else:
$Label.text = ("");
had to convert the files 1 by 1
the rotation in degrees doesnt work anymore... it uses radians
this doesnt seem to work rad_to_deg
had to use this instead * (PI/180);
pt11_spr.rotation = root1.Fnum[animFrame].pt11.pa * (PI/180);
*.pa ( angle )