如何把加密的多人魔兽TD地图变为单机版?

2025-02-09 20:35:20
推荐回答(1个)
回答1:

if ( not ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif

if ( not ( GetPlayerSlotState(Player(1)) != PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif

if ( not ( GetPlayerSlotState(Player(2)) != PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif

if ( not ( GetPlayerSlotState(Player(3)) != PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif

打开地图的j文件之后先搜索CreateNUnitsAtLocFacingLocBJ··然后把“if (
not ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING ) ) then”顶格粘贴到“call CreateNUnitsAtLocFacingLocBJ( X【这个X表示玩家X】, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Bottom_Left), GetUnitLoc(GetTriggerUnit()) )”的上面··把endif 顶格粘贴到call CreateNUnitsAtLocFacingLocBJ( X【这个X表示玩家X】, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Bottom_Left), GetUnitLoc(GetTriggerUnit()) )”的下面
要对好入座··

============================================================

另外把【Bottom_Left是玩家1 Bottom_Right是玩家2 Top_Right是玩家3

Top_Left是玩家4】这些也改了

比如:call CreateNUnitsAtLocFacingLocBJ( 1, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn【_Bottom_Left】【这个就是改过之后的】), GetUnitLoc(GetTriggerUnit()) )

下面发一段我刚才改的金木水火土的代码给你··当然是改成单机的··

function Trig_Spawn_Monsters_Actions takes nothing returns nothing
if ( not ( GetPlayerSlotState(Player(0)) != PLAYER_SLOT_STATE_PLAYING ) ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Bottom_Left), GetUnitLoc(GetTriggerUnit()) )
endif
if ( not ( GetPlayerSlotState(Player(1)) != PLAYER_SLOT_STATE_PLAYING ) ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Bottom_Right), GetUnitLoc(GetTriggerUnit()) )
endif
if ( not ( GetPlayerSlotState(Player(2)) != PLAYER_SLOT_STATE_PLAYING ) ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Top_Right), GetUnitLoc(GetTriggerUnit()) )
endif
if ( not ( GetPlayerSlotState(Player(3)) != PLAYER_SLOT_STATE_PLAYING ) ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_EnemyType[udg_pointer], Player(11), GetRandomLocInRect(gg_rct_Monster_Spawn_Top_Left), GetUnitLoc(GetTriggerUnit()) )
endif
endfunction