Author Topic: def GetPowerCost ???  (Read 1821 times)

Offline DKealt

  • Posts: 110
  • Cookies: 4
def GetPowerCost ???
« on: August 25, 2010, 09:24:07 AM »
What does this do and how is it used. It sounds like for every projectile that is fired this is how much it drains the battery but it doesn't seem to work.

I looked in common projectile scripts and it appears to add a function you need to have the line nearer the top that illustrates ...

pTorp.SetDamage (  GetDamage()  )

and then further down ...

def GetDamage ():
    return 1000.0

and so on, I tried adding a pTorp.SetPowerCost function but it just crashed. I f anyone can help me understand this it would be much appreciated

Offline teleguy

  • Posts: 363
  • Cookies: 53
Re: def GetPowerCost ???
« Reply #1 on: August 25, 2010, 10:03:27 AM »
I think that's one of the things Totally Games did not have time to implement.

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2200
  • Cookies: 1707
  • Life is life
Re: def GetPowerCost ???
« Reply #2 on: August 27, 2010, 08:41:34 PM »
Quote
and so on, I tried adding a pTorp.SetPowerCost function but it just crashed.

Because Torpedo class doesn't have a SetPowerCost property.
Acta, non verba.
aka USS Sovereign