|
|
比如boss就是gml_Object_o_crypt_boss_injector_Other_10中修改,需对整个生成加入repeat(3),还需要补大括号
比如原本是
event_inherited()
if (0 || global.playerGridX == -4)
return;
if instance_exists(o_controller)
{
var _contract_index = scr_globaltile_dungeon_get("contract_map")
var _type = asset_get_index(scr_globaltile_dungeon_get("Boss_Type"))
if (_type > self)
{
var _boss = scr_enemy_create(x, y, _type, false)
with (instance_create_depth(x, y, 0, o_dungeon_boss_controller))
target = _boss
with (_boss)
{
name = scr_globaltile_dungeon_get("Boss_Name", global.playerGridX, global.playerGridY, name)
scr_locationRoomEntityGenerateType(id, other.type)
scr_locationRoomEntityGenerateTag(id, other.tag)
scr_locationRoomEntityGeneratePresetTag(id, other.presetTag)
if (_contract_index >= 0)
ds_map_add(data, "is_quest_item", true)
}
}
else
show_message_async(scr_globaltile_dungeon_get("Boss_type"))
}
修改后:
event_inherited()
if (0 || global.playerGridX == -4)
return;
if instance_exists(o_controller)
{
repeat (3) //3就是3倍,注意大括号!!!
{
var _contract_index = scr_globaltile_dungeon_get("contract_map")
var _type = asset_get_index(scr_globaltile_dungeon_get("Boss_Type"))
if (_type > self)
{
var _boss = scr_enemy_create(x, y, _type, false)
with (instance_create_depth(x, y, 0, o_dungeon_boss_controller))
target = _boss
with (_boss)
{
name = scr_globaltile_dungeon_get("Boss_Name", global.playerGridX, global.playerGridY, name)
scr_locationRoomEntityGenerateType(id, other.type)
scr_locationRoomEntityGenerateTag(id, other.tag)
scr_locationRoomEntityGeneratePresetTag(id, other.presetTag)
if (_contract_index >= 0)
ds_map_add(data, "is_quest_item", true)
}
}
else
show_message_async(scr_globaltile_dungeon_get("Boss_type"))
}
}
|
|