参数 描述
id The id of the data structure to clear.

返回: N/A(无返回值)


With this function you can clear all data from the given list data-structure, i.e: checking any slot after calling the function will return a value of undefined. This does NOT destroy the data-structure (for that you should use ds_list_destroy) it only wipes all data from it and returns an empty (zero size) list.


if count = 15 && !ds_list_empty(command_list)
   alarm[0] = room_speed;
   ai_count = 0;

The above code checks a variable to see if it has reached a specific value and if it has it clears the ds_list indexed in the variable "command_list", sets an alarm, and resets the variable to 0.

上一页: DS Lists
下一页: ds_list_empty
© Copyright YoYo Games Ltd. 2018 All Rights Reserved