Use Nani command at C#Script

Using Naninovel C# APIs: adding custom actor implementations or commands, overriding engine services, integrating with other systems, etc.
Post Reply
bugger
Posts: 14
Joined: 22 Apr 2022 08:10

Use Nani command at C#Script

Post by bugger »

Id like to use below command at C#Script
@goto Script001.AfterStorm

I dont find how to describe ?????
var Goto = new Goto { Path = "????" };
Goto.ExecuteAsync();

idaot
support
Posts: 275
Joined: 01 Aug 2020 08:25

Re: Use Nani command at C#Script

Post by idaot »

It's exactly how you would specify a path in @goto, e.g Script001.AfterStorm.

bugger
Posts: 14
Joined: 22 Apr 2022 08:10

Re: Use Nani command at C#Script

Post by bugger »

var Goto = new Goto { Path = "Script001.AfterStorm" };

"Script001.AfterStorm" CS0029 Error
Do I need more command to use ?

idaot
support
Posts: 275
Joined: 01 Aug 2020 08:25

Re: Use Nani command at C#Script

Post by idaot »

My bad, it should be a NamedString and not a string, you can create one on the stop with new NamedString(scriptName, label).

bugger
Posts: 14
Joined: 22 Apr 2022 08:10

Re: Use Nani command at C#Script

Post by bugger »

It worked Thank you so much!!!

var aaa = new NamedString("Script001", "AfterStorm")
var Goto = new Goto { Path = aaa };
Goto.ExecuteAsync();

Post Reply