How to use a function in function's argument.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
satoshi
Posts: 3
Joined: Thu Feb 29, 2024 9:04 pm

How to use a function in function's argument.

Post by satoshi »

Thank you for your nice tool.

I have one questions.

How can I use a function in function's argument in Dialogue Entry > Sript;

I want to do this code.
スクリーンショット 2024-03-01 113908.png
スクリーンショット 2024-03-01 113908.png (9.99 KiB) Viewed 113 times
GetMoney() is defiend in my c# script. and registered.
it return a int.
User avatar
Tony Li
Posts: 20989
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use a function in function's argument.

Post by Tony Li »

Hi,

Use the [lua(code)] markup tag:

Code: Select all

ShowAlert("[lua(GetMoney())]")
You can also use Lua in Dialogue Text:
  • Dialogue Text: "You have [lua(GetMoney())] money."
satoshi
Posts: 3
Joined: Thu Feb 29, 2024 9:04 pm

Re: How to use a function in function's argument.

Post by satoshi »

Thank you!

It worked well.
User avatar
Tony Li
Posts: 20989
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to use a function in function's argument.

Post by Tony Li »

Glad to help!
Post Reply