dialogic-godot / dialogic

💬 Create Dialogs, Visual Novels, RPGs, and manage Characters with Godot to create your Game!
https://dialogic.pro
MIT License
3.35k stars 206 forks source link

Allow expressions as portraits #2201

Closed Jowan-Spooner closed 3 weeks ago

Jowan-Spooner commented 3 weeks ago

You can now use variables as portraits. You can also use expressions, for example if your character can have multiple genders, you could put those portraits in separate groups like this:

- male
   - default
   - happy
   - sad
-female
   - default
   - happy
   - sad

Then you can now use {Player.gender}+"/happy" as your portrait (assuming the Player.gender variable is either "male" or "female"). Note that this will be parsed when the portrait is set. It won't update the portrait live, in case you change the variable later, unless the portrait is set again with this expression!

Other stuff