我不明白你的目標,所以舉幾個例子:
例1
創建活動:
background_index[0] = background0;
background_index[1] = background1;
步驟事件:
seconds = current_second;
if seconds < 30
{
background_visible[0] = true;
background_visible[1] = false;
}
else
{
background_visible[0] = false;
background_visible[1] = true;
}
例2相同,但使用報警
創建活動:
background_index[0] = background0;
background_index[1] = background1;
event_perform(ev_alarm, 0);
報警0事件:
seconds = current_second;
if seconds < 30
{
background_visible[0] = true;
background_visible[1] = false;
}
else
{
background_visible[0] = false;
background_visible[1] = true;
}
alarm[0] = room_speed * 30;
例3其他想法...
創建活動:
background_index[0] = background0;
background_index[1] = background1;
background_visible[0] = true;
background_visible[1] = true;
event_perform(ev_alarm, 0);
報警0事件:
seconds = current_second;
if seconds < 30
{
background_index[0] = background0;
background_index[1] = background1;
}
else
{
background_index[0] = background1;
background_index[1] = background0;
}
background_x[0] = 0;
background_x[1] = 0;
background_hspeed[0] = 0;
background_hspeed[1] = -2;
alarm[0] = room_speed * 30;
如果你需要改變的背景很多次,那麼你需要使用step
事件或報警,因爲create
事件做一次。另外,當你使用滾動時,你需要記住,在一段時間後x
背景的位置將在屏幕之外,所以你看不到背景(除了背景平鋪的情況)。
「因爲創建事件只做一次」現在它是有道理的。 –