mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added the description of set_scr_name function
This commit is contained in:
@@ -1040,6 +1040,14 @@ sfall_funcX metarule functions
|
||||
- `gvarNumber`: the number of the global variable controlling the quest
|
||||
- `thresholdValue`: the value of the global variable at which the quest is counted as a failure
|
||||
|
||||
----
|
||||
#### set_scr_name
|
||||
`void sfall_func1("set_scr_name", string name)`
|
||||
- Overrides the name of the script object that was set from **scrname.msg**
|
||||
- The changed name will be reset each time the player leaves the map or reloads the game
|
||||
- Passing an empty string ("") to the `name` argument or omitting it will allow the game to get the name for the object from pro_*.msg files
|
||||
- __NOTE:__ this function is intended for use in normal game scripts
|
||||
|
||||
|
||||
****
|
||||
_See other documentation files (arrays.md, hookscripts.md) for related functions reference._
|
||||
|
||||
@@ -139,7 +139,7 @@ static const SfallMetarule metarules[] = {
|
||||
{"set_quest_failure_value", mf_set_quest_failure_value, 2, 2, -1, {ARG_INT, ARG_INT}},
|
||||
{"set_rest_heal_time", mf_set_rest_heal_time, 1, 1, -1, {ARG_INT}},
|
||||
{"set_rest_mode", mf_set_rest_mode, 1, 1, -1, {ARG_INT}},
|
||||
{"set_scr_name", mf_set_src_name, 0, 1, -1, {ARG_STRING}},
|
||||
{"set_scr_name", mf_set_scr_name, 0, 1, -1, {ARG_STRING}},
|
||||
{"set_selectable_perk_npc", mf_set_selectable_perk_npc, 5, 5, -1, {ARG_OBJECT, ARG_STRING, ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_terrain_name", mf_set_terrain_name, 3, 3, -1, {ARG_INT, ARG_INT, ARG_STRING}},
|
||||
{"set_town_title", mf_set_town_title, 2, 2, -1, {ARG_INT, ARG_STRING}},
|
||||
|
||||
@@ -503,7 +503,7 @@ void mf_set_quest_failure_value(OpcodeContext& ctx) {
|
||||
QuestList::AddQuestFailureValue(ctx.arg(0).rawValue(), ctx.arg(1).rawValue());
|
||||
}
|
||||
|
||||
void mf_set_src_name(OpcodeContext& ctx) {
|
||||
void mf_set_scr_name(OpcodeContext& ctx) {
|
||||
long sid = fo::func::scr_find_sid_from_program(ctx.program());
|
||||
if (sid == -1) return;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void mf_get_ini_section(OpcodeContext&);
|
||||
|
||||
void mf_set_quest_failure_value(OpcodeContext&);
|
||||
|
||||
void mf_set_src_name(OpcodeContext&);
|
||||
void mf_set_scr_name(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user