No of count: {note}No of count{formmenu: 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; name=count} {endnote: trim=yes}
{repeat: count; locals=dungeon}
Item No :
CLASS :
MOVE :
{endrepeat}
So in this I want item no. to change when more are added.
Here is one way to do it:
{note}No of count{formmenu: 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; name=count} {endnote: trim=yes}
{repeat: for x in seq(1, count); locals=dungeon}
Item No : {=x}
CLASS :
MOVE :
{endrepeat}
@Mansur_Kutybayev Thank you.
Can you also explain to me what you did here as I want to have in-depth knowledge on this.
Sure,
- Repeat through list Text Blaze | {repeat}. This syntax lets you loop through values of the provided list - list is generated with
seq(1, count)
seq(1, count)
Text Blaze | Formula Reference. This function creates a list from 1 to count. Example seq(1, 4)
results in [1, 2, 3, 4]
In the example when count
is equal to 4. x
in the repeat is going to be 1, 2, 3 and 4. Therefore we use it {=x}
to set the number as needed.