现在我正在制作一个无尽的跑步者,其中物体在我面前随机产生。
我被告知要创建一个 spawnController 和 globalController 对象,所以我做到了。那么这段代码应该放在控制器的step事件下
if(tick = 32)
{
tick = 0;
instance_create(room_width,room_height,random(spike,groundBlock));
instance_create(room_width,irandom_range(0,room_height-32));
}
tick += 1;
它有什么问题吗,因为我收到一个错误,即:
In object spawnController, event Step, action 1 at line 4: Wrong number of arguments to function or script.