Clears all of the data from a given stack.



参数 描述
id 要清除的数据结构的id。

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


With this function you can clear all data from the given stack data-structure. This does NOT destroy the data-structure (for that you should use ds_stack_destroy) it only wipes all data from it and returns an empty stack.


if ai_count = 15 && !ds_stack_empty(AI_stack)
   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_stack indexed in the variable "AI_stack", sets an alarm, and resets the variable to 0.

上一页: Stacks
下一页: ds_stack_empty
© Copyright YoYo Games Ltd. 2018 All Rights Reserved