![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 def setupArenaBrawlMission(homeTeam, homeGoalID, enemyGoalID): 00002 global game 00003 00004 #define counter for goals 00005 objCount = object('Sra.Obj_Counter', game) 00006 objCount.Tag = homeTeam + '_Goals' 00007 objCount.CountTarget = 5 00008 00009 #define sequence of ball starting in home goal, going to enemy goal 00010 objSeq = object('Sra.Obj_Sequence', game) 00011 objSeq.Tag = homeTeam + '_Sequence' 00012 00013 def IsCarryingBall(self, source, eventName, eventParams): 00014 if eventParams in 'HeldObject' and eventParams['HeldObject']: 00015 return self.ExtraInfo['ball_id'] == eventParams['HeldObject'].UniqueID 00016 return False 00017 00018 #ball enters home goal 00019 objStartHome = object('Sra.Obj_Area', game) 00020 objStartHome.AreaIDs = [homeGoalID] 00021 objStartHome.FactionName = homeTeam 00022 objStartHome.ExtraInfo = {'ball_id': homeTeam + '_Ball'} 00023 objStartHome.Callback = IsCarryingBall #Are we carrying our ball in the home goal 00024 00025 #ball enters enemy goal 00026 objScoreGoal = object('Sra.Obj_Area', game) 00027 objScoreGoal.AreaIDs = [enemyGoalID] 00028 objScoreGoal.FactionName = homeTeam 00029 objScoreGoal.ExtraInfo = {'ball_id': homeTeam + '_Ball'} 00030 objScoreGoal.Callback = IsCarryingBall #Are we carrying our ball in the home goal 00031 00032 objSeq.subObjectives = [objStartHome, objScoreGoal] 00033 00034 objCount.subObjectives = [objSeq] 00035 00036 mission = game.AddMission() 00037 mission.objectiveTree = objCount 00038 mission.FactionName = homeTeam 00039 00040 return setupArenaBrawlMission
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.