-
Notifications
You must be signed in to change notification settings - Fork 0
giveturn
this library adds a function that forcibly gives a turn to a specified team. Usually used at the end of cutscenes.
To use anything from this library, you need to add the following to the script:
HedgewarsScriptLoad("/Missions/Campaign/A_Collection_of_Unimaginative_Dreams/Scripts/giveturn.lua")
Hedgewars' Tracker
library needs to be loaded too.
HedgewarsScriptLoad("/Scripts/Tracker.lua")
as is recommended by the Tracker
library, the function trackTeams()
needs to be added in onGameStart()
function onGameStart()
trackTeams()
end
the function CheckGivenTurn()
needs to be added in onNewTurn()
function onNewTurn()
CheckGivenTurn()
end
all hedgehogs need to be tracked from the beginning
function onGearAdd(gear) if GetGearType(gear) == gtHedgehog then trackGear(gear) end end
function onGearDelete(gear) if GetGearType(gear) == gtHedgehog then trackDeletion(gear) end end
This function is called when a new turn starts that was called using GiveTurn. Useful when a team still needs to be passive after all teams are no longer passive (NPC Teams, etc.)
function onGivenTurn()
SetTeamPassive(PrincessTeam,true)
end
Ends the current turn and gives it to the first hedgehog of team team
, or optionally to a hedgehog hog
. Needs to be a real team name, see AddTeam.
GiveTurn(HelperTeam)
GiveTurn(HumanName,triggered)
every other function in this library isn't supposed to be used anywhere else