DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GUIAction_SetValue()

void GUIAction_SetValue ( int index,
string strVal )

См. определение в файле PluginDayZCreatureAIDebug.c строка 665

666 {
667 switch (GetVariableType(index))
668 {
670 int intValue = strVal.ToInt();
671 if (GetGame().IsMultiplayer())
672 {
673 SyncSetValueInt(index, intValue);
674 }
675 else
676 {
677 SetValueInt(index, intValue);
678 }
679 break;
681 float floatValue = strVal.ToFloat();
682 if (GetGame().IsMultiplayer())
683 {
684 SyncSetValueFloat(index, floatValue);
685 }
686 else
687 {
688 SetValueFloat(index, floatValue);
689 }
690 break;
692 bool boolValue;
693 strVal.ToLower();
694 if (strVal.Contains("true"))
695 {
696 boolValue = true;
697 }
698 else if (strVal.Contains("false"))
699 {
700 boolValue = false;
701 }
702 else
703 {
704 boolValue = (bool)strVal.ToInt();
705 }
706
707 if (GetGame().IsMultiplayer())
708 {
709 SyncSetValueBool(index, boolValue);
710 }
711 else
712 {
713 SetValueBool(index, boolValue);
714 }
715 break;
716 }
717 }
DayZCreatureAnimScriptDebugVarType
Определения DayZCreature.c:2
void SyncSetValueBool(int index, bool value)
Определения PluginDayZCreatureAIDebug.c:882
void SetValueInt(int index, int value)
Определения PluginDayZCreatureAIDebug.c:228
void SyncSetValueInt(int index, int value)
Определения PluginDayZCreatureAIDebug.c:844
void SetValueFloat(int index, float value)
Определения PluginDayZCreatureAIDebug.c:233
void SetValueBool(int index, bool value)
Определения PluginDayZCreatureAIDebug.c:238
DayZCreatureAnimScriptDebugVarType GetVariableType(int index)
Определения PluginDayZCreatureAIDebug.c:269
void SyncSetValueFloat(int index, float value)
Определения PluginDayZCreatureAIDebug.c:863
Определения EnConvert.c:2
proto native CGame GetGame()
proto native int ToInt()
Converts string to integer.
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
proto native float ToFloat()
Converts string to float.
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки string::Contains(), GetGame(), GetVariableType(), SetValueBool(), SetValueFloat(), SetValueInt(), SyncSetValueBool(), SyncSetValueFloat(), SyncSetValueInt(), string::ToFloat(), string::ToInt() и string::ToLower().

Используется в OnGUI_VariablesEdit().