list.append(("Stinger","Omni",{'invertible':True,'nose':math.pi,'topspeed':99,'throttle':130,'turnspeed':2.5,'turn':60,'radius':0.3,'weapons':(1,2,3,4)}))
Try this? There were some random spaces in your bindings and you don't need range on a poker...Code: [Select] list.append(("Stinger","Omni",{'invertible':True,'nose':math.pi,'topspeed':99,'throttle':130,'turnspeed':2.5,'turn':60,'radius':0.3,'weapons':(1,2,3,4)}))Also, check for spaces after "Fire" and "weapon" for the control and smart zone names.
You got my vote for RA2 Wizard. Always and forever.
ALERT- Another WS coming up...
I'm fine with hugging reier
That didn't help at all.
def Tick(self): # fire weapon if self.weapons: targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \ and not plus.isDefeated(x.robot)] if len(targets) > 0: for trigger in self.triggers: [B][COLOR=Blue]self.Input(trigger, 0, 1)[/COLOR][/B] return AI.SuperAI.Tick(self)
def Tick(self): # fire weapon if self.weapons: targets = [x for x in self.sensors.itervalues() if x.contacts > 0 \ and not plus.isDefeated(x.robot)] if len(targets) > 0: for trigger in self.triggers: [B][COLOR=#0000ff]self.Input(trigger, 0, 100)[/COLOR][/B] return AI.SuperAI.Tick(self)
list.append(("Epidemic","Poker",{'invertible':True,'radius':0.5,'topspeed':99,'throttle':130,'weapons':(1,2,3,4,5)}))
GRAAGAHGHGSA
GRAAGAHGHGSAmaybe i shouldnt have tried to ai these last night ;P
from __future__ import generatorsimport plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Omni2(AI.SuperAI): "Omni2 strategy" name = "Omni2" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.zone = "weapon" self.triggers = ["Fire"] if 'triggers' in args: self.triggers = args['triggers'] self.tactics.append(Tactics.Engage(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") self.RegisterSmartZone(self.zone, 1) return AI.SuperAI.Activate(self, active) def Tick(self): self.Input("Spin", 0, 100) return AI.SuperAI.Tick(self) def InvertHandler(self): # fire weapon once per second (until we're upright!) while 1: for trigger in self.triggers: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 def LostComponent(self, id): # if we lose all our weapons, stop using the Engage tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: self.RemoveTactic("Engage") self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) AI.register(Omni2)
name = BFFF Flamethrower AIpreview = bffff_preview.bmpdir = bobmodel = bobflamer.gmftype = weaponsbase = Flamethrowerdescription = description = A BFFF Flamethrower that uses only 1 gas to bypass AI problems. For the sake of fairness it is recommanded that you put in the amount of CO2tanks as you would normally need.attachsound = sounds\cmp_generic.wavstandard = 1hidden = 2firesound = sounds\flame_thrower.wavairmaxinoutrate = -1hitpoints = 500
self.tactics.append(Tactics.Engage(self))
throttle = min(max(throttle, -100), 100) turning = min(max(turning, -100), 100)