Karos Graveyard ::
Function Reference :: Scope Reference :: Variable Reference
Description
Transfers all of Player1's completed research to Player2.

function Player_BequeathResearch(iPlayer1, iPlayer2)
    local iRace1 = Player_GetRace(iPlayer1) + 1
    local iRace2 = Player_GetRace(iPlayer2) + 1
    if (iRace1 == iRace2) then
        dofilepath([[data:scripts/building and research/]] .. races[iRace1][1] .. [[/research.lua]])
        for k, iCount in research do
            if ((Player_HasResearch(iPlayer1, iCount.Name) == 1) and (Player_HasResearch(iPlayer2, iCount.Name) == 0)) then
                Player_GrantResearchOption(iPlayer2, iCount.Name)
            end
        end
    else
        print("Player" .. iPlayer1 .. " and Player" .. iPlayer2 .. " are of different races.")
    end
end
:: ::
Hide Download Bar
Ctrl + Shift + Z = Show/Hide Download Bar
Downloads
Download Manager (S3)
Clear
Left Click: Clear All Finished
Right Click: Undo last clear
100%
Download History
Download list is empty
FunctionplayBgLightAnim.html
100%
00:00
521 KB
2.22 MB/s
FunctionplayBgLightAnim.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\FunctionplayBgLightAnim.html
Status:
521 KB / 521 KB ( 2.22 MB/s )
File Size:
521 KB
Virus scan:
Time Start:
2019.08.20 - 19:15:43
Time to Complete:
<00:01
Time Left:
00:00
Percent Done:
100%
Average Speed:
2.22 MB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop