====== ValueGroup Class ====== Class For ValueGroup Interface [[developer_center:developer_editor:script|Return To Previous Page]] ------ ===== API list ===== ^ Class:apiName(parameters) ^ Return ^ Description ^ | Valuegroup:getAllGroupItem(vartype:VARTYPE, libname:string, playerid:number) | ErrorCode.OK ret:table | Get all the values in the variable group | | Valuegroup:insertInGroupByName(vartype:VARTYPE, libvarid:string, value:number, playerid:number) | ErrorCode.OK | Add any value to any group, and add it to the last digit of the group | | Valuegroup:removeValueIndexByName(vartype:VARTYPE, libvarid:string, indx:number, playerid:number) | ErrorCode.OK | Remove the value of the specified number from any group, become nil, and the number will not be removed | | Valuegroup:removeValueByName(vartype:VARTYPE, libvarid:string, value:number, playerid:number) | ErrorCode.OK | Remove any value of nil from any group | | Valuegroup:clearGroupByName(vartype:VARTYPE, libvarid:string, playerid:number) | ErrorCode.OK | Clear any group, number, and content are all cleared | | Valuegroup:getGrouplengthByName(vartype:VARTYPE, libvarid:string, playerid:number) | ErrorCode.OK number:number | Get the length of the array | | Valuegroup:getValueNoByName(vartype:VARTYPE, libvarid:string, indx:number, playerid:number) | ErrorCode.OK libvarid:number | Get the value of the specified number in the group | | Valuegroup:setValueNoByName(vartype:VARTYPE, libvarid:string, indx:number, value:number, playerid:number) | ErrorCode.OK | Set the value of the number index in the group | | Valuegroup:getRandomValueByName(vartype:VARTYPE, libvarid:string) | ErrorCode.OK value:number | Randomly obtain the value in the array | | Valuegroup:insertValueByName(vartype:VARTYPE, libvarid:string, no:number, value:number, playerid:number) | ErrorCode.OK | Insert any value at any numbered position in any group | | Valuegroup:deleteNoByName(vartype:VARTYPE, libvarid:string, no:number, playerid:number) | ErrorCode.OK | Clear the value of the specified number from any group | | Valuegroup:deleteValueByName(vartype:VARTYPE, libvarid:string, val:number, playerid:number) | ErrorCode.OK | Clear the specified value from any group | | Valuegroup:addGroupByName(vartype:VARTYPE, libvarid:string, libvarid2:string, playerid1:number, playerid2:number) | ErrorCode.OK | Add the value of group 2 at the end of group 1 | | Valuegroup:removeGroupByName(vartype:VARTYPE, libvarid:string, libvarid2:string, playerid1:number, playerid2:number) | ErrorCode.OK | Compare group 1 and group 2, if group 1 has the same value as group 2, set it to nil | | Valuegroup:deleteGroupByName(vartype:VARTYPE, libvarid:string, libvarid2:string, playerid1:number, playerid2:number) | ErrorCode.OK | Compare group 1 and group 2, and clear if there is the same value in group 1 as group 2 | | Valuegroup:insertGroupByName(vartype:VARTYPE, libvarid:string, no:number, libvarid2:string, playerid1:number, playerid2:number) | ErrorCode.OK | Insert the value of group 2 at the specified number position of group 1 | | Valuegroup:replaceValueByName(vartype:VARTYPE, libvarid:string, oldval:number, newval:number, playerid:number) | ErrorCode.OK | Replace any value in any group with a new value | | Valuegroup:sortGroupByName(vartype:VARTYPE, libvarid:string, sortType:number, playerid1:number) | ErrorCode.OK | Sort any set of values | | Valuegroup:hasValueByName(vartype:VARTYPE, libvarid:string, val:number, playerid:number) | ErrorCode.OK | Whether any group has any value, if there is a result return 0 | | Valuegroup:hasNoByName(vartype:VARTYPE, libvarid:string, no:number, playerid:number) | ErrorCode.OK | Whether there is a value in any group position, if there is, the result returns 0 | | Valuegroup:getValueCountByName(vartype:VARTYPE, libvarid:string, val:number, playerid:number) | ErrorCode.OK libvarid:number | Get the number of any value of any group | | Valuegroup:getGroupNoByValue(vartype:VARTYPE, libvarid:string, val:number, playerid:number) | ErrorCode.OK libvarid:number | Get the number of any value in any group, if there are multiple same values, only return the first one | | Valuegroup:getSpcialValueByName(libvarid:string, type:number) | ErrorCode.OK | Obtain the maximum and minimum values in the group | ===== VarLib2 API list ===== Taken from [[developer_center:developer_editor:script:varlib|VarLib2]] ^ Class:apiName(parameters) ^ Return ^ Description ^ | VarLib2:setGlobalVarByName(actionattr:number, msg:string, val:number) | ErrorCode.OK | Set the global variables in the variable library | | VarLib2:getGlobalVarByName(actionattr:number, msg:string) | ErrorCode.OK val:any | Get the global variables of the variable library | | VarLib2:setPlayerVarByName(object:number, actionattr:number, msg:string, val:number) | ErrorCode.OK | Set private variables in the variable library | | VarLib2:getPlayerVarByName(object:number, actionattr:number, msg:string) | ErrorCode.OK val:any | Get private variables in the variable library | ===== ActionAttr List ===== {{:developer_center:developer_editor:script:screenshot_1729491961.png?nolink|}} ((TABLE FROM [[developer_center:developer_editor:script:datatype#obtain_trigger_variable|Datatypes - Obtain trigger variable]])) ((The **actionattr** is the type of the trigger variable))