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