Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: onHit()  (Read 1137 times)

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
onHit()
« on: August 09, 2012, 12:11:22 PM »

A function that gets called whenever a Projectile hits something, with the following parameters:

1.  What type of object's been hit (Projectile, Obstacle, Ship).
2.  Game ID of the object.
3.  Weapon name.
4.  Weapon owner ID.

The function would return the damage inflicted, if any.

Why would this be cool?

1.  All sorts of fancy damage systems.
2.  Do-it-yourself implementation of crits and other forms of complex damage.
3.  Armor systems, resistance, special mods.

Granted, the AI can't ever see any of this, and until it's Java we can re-implement, it won't "know" about any of this, but it'd be a big step forwards in terms of modding control over the fundamentals of combat.
« Last Edit: August 09, 2012, 12:15:47 PM by xenoargh »
Logged
Please check out my SS projects :)
Xeno's Mod Pack