Difference behavior between @ and []

Discuss authoring naninovel scenario scripts.
Post Reply
bugger
Posts: 14
Joined: 22 Apr 2022 08:10

Difference behavior between @ and []

Post by bugger »

Difference behavior between @ and []
Test bellow command
TEST A Click need 4time
TEST B Click need 7time (We need click at [] )
I dont want to click at [] (Because nothing to do with Game Scene )
How do we ignore click at []?

TEST A
hello
@set a=1
hello
@set a=2
hello

TEST B
test2
hello
[set a=1]
hello
[set a=2]
hello

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

Re: Difference behavior between @ and []

Post by idaot »

[] are meant to be used within generic text lines and not on their own lines. @ are to be put on their own line. https://naninovel.com/guide/naninovel-s ... d-inlining

In this case, you should not put [] in their own lines, use @ instead.

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

Re: Difference behavior between @ and []

Post by bugger »

Thank you for reply, I hope for improvement

Other Novel Script

You Killed Enemy!
You Skiled UP
[Set Exp+=1][SetSkill+=1][SetMagic+=1][SetPower+=1][SetPower+=1][Set Gold+=100]
[if Exp>=300][set Level+=1][endif]

You Leveled up!! {Exp}Exp,{Skil}Skil.......

NaniNovel Script ######## Not labor-saving

You Killed Enemy!
You Skiled UP
@setExp+=1
@setSkill+=1
@setMagic+=1
@setPower+=1
@setGold+=100
@if
@Exp>=300
@set Level+=1
@endif

You Leveld up {Exp}Exp,{Skil}Skil.......

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

Re: Difference behavior between @ and []

Post by idaot »

You can always use @gosub to reuse bits of code.
https://naninovel.com/api/#gosub

Alternatively consider creating a custom command.

Post Reply