Hits draining resources - Possible?

Hits draining resources - Possible?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Hits draining resources - Possible?

Post 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)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Not possible, given current feature set.... try posting this in feature requests instead.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

Bugger. I don't suppose shields could be configured to drain metal...?
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post 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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Making them drain Metal if a tag was set would be fairly trivial.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

You can make the unit activate and set its MetalUse to drain the metal.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

True, but on/off might be needed for other things...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

That'd work, too. But it's more hack-y.
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

You do realise that I fixed the hit-detection problem, right?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post 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.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post 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)
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Post by Archangel of Death »

It might be possible to have multiple shields...
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post 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*
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Image
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

:shock: :|
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

ROFL
Post Reply

Return to “Game Development”