Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
faceoff Class Reference
Inheritance diagram for faceoff:

Public Member Functions

def __init__
 
def launchShip
 
def launch_new_wave
 
def Execute
 

Data Fields

 lasttime
 
 waittime
 

Detailed Description

Definition at line 9 of file faceoff.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 10 of file faceoff.py.

10 
11  def __init__(self):
12  VS.SetDifficulty(0.1)
13  Director.Mission.__init__(self)
14  self.lasttime=-100
15  self.waittime=100.0
16  self.launchShip("nova","confed")
17  self.launchShip("nova","confed")
18  self.launchShip("revoker","pirates")
19  self.launchShip("revoker","pirates")
20  self.launchShip("revoker","pirates")

Member Function Documentation

def Execute (   self)

Definition at line 37 of file faceoff.py.

References faceoff.lasttime, and faceoff.waittime.

37 
38  def Execute (self):
39  time = VS.GetGameTime()
40  if (time-self.lasttime>self.waittime):
41  #self.launch_new_wave()
42  VS.IOmessage (0,"game","all","[Confed] This is a test of the emergency broadcast system.")
43  self.lasttime=time
def launch_new_wave (   self)

Definition at line 23 of file faceoff.py.

References faction_ships.get_enemy_of(), faction_ships.get_friend_of(), faction_ships.getRandomFighter(), faceoff.launchShip(), and vsrandom.randrange().

23 
24  def launch_new_wave(self):
25  side = vsrandom.randrange(0,2)
26  faction="confed"
27  ai = vsrandom.randrange(0,2)
28  if (ai==0):
29  ai = "printhello.py"
30  else:
31  ai = "default"
32  if (side==0):
33  faction=faction_ships.get_enemy_of("confed")
34  else:
35  faction=faction_ships.get_friend_of("confed")
36  launched = launchShip(faction_ships.getRandomFighter(faction),faction);
def launchShip (   self,
  type,
  faction 
)

Definition at line 21 of file faceoff.py.

References launch.launch_wave_around_unit().

21 
22  def launchShip (self,type,faction):
return launch.launch_wave_around_unit("Shadow",faction,type,"default",1,100.0,2000.0,VS.getPlayer(),'')

Field Documentation

lasttime

Definition at line 13 of file faceoff.py.

waittime

Definition at line 14 of file faceoff.py.


The documentation for this class was generated from the following file: