inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.14k stars 492 forks source link

ink 1.2.0 logic in choice doesn't work anymore #910

Open AwesomeGameConcepts opened 4 months ago

AwesomeGameConcepts commented 4 months ago

Hello, i used to add logic into my choice add that was working like have a preview of a RPG test in the choice like this + [Tutorial_Exploration.Exploration_1.Choice_{ExplorationTestPreviewOneAssist(PC, GetListValue(NPC,1), Normal, 0)}] Since i update ink to 1.2.0 it's doesn't work anymore, the story freeze i found a workaround by use this :

{ExplorationTestPreviewOneAssist(PC, GetListValue(NPC,1), Normal, 0)}
+ [Tutorial_Exploration.Exploration_1.Choice_]

But i need to change more than 1000 RPG tests on my game so i will be glad if this is fixed, thanks.

wldmr commented 3 months ago

I've just tried this

* [choice_{func(1)}]

== function func(val)
whatever

and it (correctly) outputs

1: choice_whatever

Seems to work fine. Can you please elaborate, maybe give a minimal failing example?

What does ExplorationTestPreviewOneAssist do? Does it return anything or produce text? Is it an external function?

AwesomeGameConcepts commented 3 months ago

Hello 🙂. It's calling an external function bind in unity. I have also a empty declared function for running from ink compatibility purpose.