Page 1 of 1

Hits draining resources - Possible?

Posted: 08 Sep 2006, 17:32
by Guessmyname
See title. One of the things I hope to attempt (as a gameplay mechanic) is that hits drain res. So if you hit an enemy, a bit of his resources are drained (note: Not given to you, just drained from his supplies). I was wondering if there was a way to do this in the dev version, ie a MetalDrain tag (for example) or even better a script-based thing (SET/GET MetalUse or something) that I can use in the HitByWeapon() script (or any other script for that matter)

Posted: 08 Sep 2006, 17:35
by Caydr
Not possible, given current feature set.... try posting this in feature requests instead.

Posted: 08 Sep 2006, 17:40
by Guessmyname
Bugger. I don't suppose shields could be configured to drain metal...?

Posted: 08 Sep 2006, 18:26
by Acidd_UK
Cadyr, how did the old shields work? Didn't they charge up at a set e/sec rate? Could you hack the max chage, charge rate etc so that all units had an invisible shield with like 0.00001 repulse factor but a high to-charge energy cost, but low max charge or something very hacky like this long runon sentance?

Posted: 08 Sep 2006, 18:31
by Argh
Making them drain Metal if a tag was set would be fairly trivial.

Posted: 08 Sep 2006, 18:41
by KDR_11k
You can make the unit activate and set its MetalUse to drain the metal.

Posted: 08 Sep 2006, 18:48
by Guessmyname
True, but on/off might be needed for other things...

Posted: 08 Sep 2006, 18:48
by Argh
That'd work, too. But it's more hack-y.

Posted: 08 Sep 2006, 18:53
by Archangel of Death
If you give a unit a shield the size of its hitsphere + a few pixels, the shield will (in theory) get hit by whatever projectile, but the unit will still get hit by the weapons aoe (as long as its big enough). You'd then use a shield of the type that drains energy per hit and destroys the projectile. However: it could only work with energy; it would be up to you to make sure all weapons had a big enough aoe to work and hit the unit with max or near max damage; it would not work with beamlasers unless they fixed the not draining/using energy when they hit shields.

And a potential problem (why I said 'in theory'), I am unsure if shields suffer from the hit detection problems that units do, or perhaps different even more complicated one.

Posted: 08 Sep 2006, 19:27
by Argh
You do realise that I fixed the hit-detection problem, right?

Posted: 08 Sep 2006, 21:22
by KDR_11k
The hit detection isn't the problem, firing a beam laser at a shield that has ShieldEnergyUse set doesn't drain any energy.

Shield impacts happen at discrete locations so a projectile being fired into a shield that only slightly larger than its owner would hit the shield (drain energy) but the explosion would happen a pseudorandom distance behind the shield surface which means the full blast hits the unit.

Posted: 08 Sep 2006, 21:30
by Guessmyname
Shields are used for other things (representing PDWs - Point Defense Weapons, or at least until the weapon interception system is more flexible - and your bog-standard shields)

Posted: 09 Sep 2006, 02:03
by Archangel of Death
It might be possible to have multiple shields...

Posted: 09 Sep 2006, 04:01
by Hunter0000
Argh wrote:Making them drain Metal if a tag was set would be fairly trivial.
hmmm this calls for a...

Image

Hacky shields = teh bad

Patches = teh good

*pokes Argh, the new master patcher and god of flamethrowers*

Posted: 09 Sep 2006, 08:01
by KDR_11k
Image

Posted: 09 Sep 2006, 09:22
by LOrDo
:shock: :|

Posted: 09 Sep 2006, 13:44
by SwiftSpear
ROFL