元編程參考文件

故事變數

12 個節點

本頁內容 12

新增

函數

Adds to a number.

簽名
新增(Story Variables: Story Variables, 名稱: 文字, 量: 數字)
void Add(
    StoryVariables Story Variables,
    string name,
    double amount)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—
量數字—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

標誌

函數

Whether a variable holds: true, non-zero, non-empty.

簽名
標誌(Story Variables: Story Variables, 名稱: 文字) -> 真否
bool Flag(StoryVariables Story Variables, string name)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.

返回

標誌真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

整數

函數

A number variable's value as a whole number.

簽名
整數(Story Variables: Story Variables, 名稱: 文字) -> 整數
int Integer(StoryVariables Story Variables, string name)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.

返回

整數整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

列表

函數

A list variable's items.

簽名
列表 -> IReadOnlyList<Value>
    Story Variables: Story Variables
    名稱: 文字
IReadOnlyList<Value> List(
    StoryVariables Story Variables,
    string name)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.

返回

列表IReadOnlyList<Value>
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

列表包含

函數

Whether a list variable holds a value, compared as text.

簽名
列表包含 -> 真否
    Story Variables: Story Variables
    名稱: 文字
    項: 文字
bool ListContains(
    StoryVariables Story Variables,
    string name,
    string item)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.
項文字—The value looked for.

返回

包含真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

數字

函數

A number variable's value; unset reads as 0.

簽名
數字(Story Variables: Story Variables, 名稱: 文字) -> 數字
double Number(StoryVariables Story Variables, string name)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.

返回

數字數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

隨機

函數

A whole number from Minimum to Maximum, both included, from the story's own generator, so rolling back and choosing again draws the same. It advances the generator, so it is not const.

簽名
隨機 -> 整數
    Story Variables: Story Variables
    最小值: 整數
    最大值: 整數
int Random(
    StoryVariables Story Variables,
    int minimum,
    int maximum)

參數

名稱型別預設值說明
Story VariablesStory Variables—
最小值整數—
最大值整數—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

設定標誌

函數

Sets a flag.

簽名
設定標誌(Story Variables: Story Variables, 名稱: 文字, 值: 真否)
void SetFlag(
    StoryVariables Story Variables,
    string name,
    bool value)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—
值真否—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

設定數字

函數

Sets a number.

簽名
設定數字(Story Variables: Story Variables, 名稱: 文字, 值: 數字)
void SetNumber(
    StoryVariables Story Variables,
    string name,
    double value)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—
值數字—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

設定文字

函數

Sets text.

簽名
設定文字(Story Variables: Story Variables, 名稱: 文字, 值: 文字)
void SetText(
    StoryVariables Story Variables,
    string name,
    string value)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—
值文字—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

文字

函數

A text variable's value; unset reads as empty.

簽名
文字(Story Variables: Story Variables, 名稱: 文字) -> 文字
string Text(StoryVariables Story Variables, string name)

參數

名稱型別預設值說明
Story VariablesStory Variables—
名稱文字—The variable.

返回

文字文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說

已存取

函數

Whether a label has been entered in this playthrough.

簽名
已存取(Story Variables: Story Variables, 標籤: 文字) -> 真否
bool Visited(StoryVariables Story Variables, string label)

參數

名稱型別預設值說明
Story VariablesStory Variables—
標籤文字—The label.

返回

已存取真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
故事變數
所屬包
Novella 視覺小說