Tired Annihilation 0.07 Saboteur Bug

Tired Annihilation 0.07 Saboteur Bug

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

bwansy
Posts: 385
Joined: 02 May 2006, 05:21

Tired Annihilation 0.07 Saboteur Bug

Post by bwansy »

See for yourself:
Image

What I did:
1. Plant a bomb on a fink (I think it works for any vtol, though)
2. Order the fink to takeoff.
3. Wait...
4. Boom! And that's it.
You can still control it afterwards, as if it's still alive (in fact, it is).
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Does this make the plane invincible?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

it should die after one shot, I think spring code checks for health <=0 instead of 0.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Post by REVENGE »

lol That's a bigass red bar right thar. :lol:
bwansy
Posts: 385
Joined: 02 May 2006, 05:21

Post by bwansy »

SwiftSpear wrote:Does this make the plane invincible?
No. It's exactly what Baczek said.
User avatar
Foxomaniac
Posts: 691
Joined: 18 Jan 2006, 16:59

Post by Foxomaniac »

Why would anyone plant a bomb on a fink instead of a juicy fusion anyway O.o.

Cool bug, nonetheless.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

:roll:

Explanation:
I used Spring.SetUnitHealth to increase the damage of a corroach selfd, so the explosion can kill a krog. The script doesn't not recheck it for and it don't need to (in most cases it works). -> that causes the -xyz% healthbar

But the real problem is that the corroach selfd on the ground and not in the air as it should...
And atm i don't have any idea how to fix it, except that airs planes selfd themselves (->no fancy corroach explosion :()

PS: I said Tired, that the script is still beta. That's why there isn't yet a thread in the Lua forum ...
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

shouldn't selfd effects and damage be set in unit's fbi?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

the problem is that i can't take selfd for ground units, cause:
1. the bomb would always have a different sizes -> odd
2. some units have a too huge selfd like adv. fusions, krog, ...

that's why i take a corroach and deploy it in the unit and let it selfd -> fancy explosion. but it doesn't always do enough damage on krogs, etc. that's why i reduce manually the health.

But that doesn't work in the air :(
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

mhm. until LuaRules get a explict DoDamage call (instead of just setting health), your best bet is to fake damage somehow ( e.g. create a tiny invisible unit and blow it up), or reduce heath of units in radius just before explosion.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

LuaRules can kill units too. Adjust the unit's health,
then DestroyUnit() if the unit's health is <= 0.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

trepan saves the day, as usual.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

This also seems like a good opportunity to try an all-LUA explosion ;-)
Spring.GetUnitsInSphere(), do the damages, send the DestroyUnit()s,
and make a pretty explosion (with a shader, if available)

P.S. At some point, raw weapons access will probably be added to the
lua interface. It isn't a top priority for me at the moment, but it's just of
matter of doing the grind work.
Last edited by trepan on 21 Aug 2007, 14:57, edited 1 time in total.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

imbaczek:
That's what I have done

But the real problem is ....
jK wrote:... that the corroach selfd on the ground and not in the air as it should...
I tried to lift it with Spring.MoveCtrl, but the explosion+damage is still on the ground, only a small (cob) part of the animation (w/o damage) is in the air.

trepan:
DestroyUnit can kill units, but you still can't do damage and raise an UnitDamaged event afterwards ... (though not a probleme here, in general it is)
and as mentioned before, I can't use DestroyUnit cause it always would give another explosion -> very odd
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

chain explosions -- there's precedence

P.S. You could generate the UnitDamaged() calls yourself.
(I may add a third parameter to SetUnitHealth() to have it
optionally generate UnitDamaged() call-ins, or simply add a
DoDamage() call-out).
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

chain explosions?
that doesn't solve the problem nor does it matter here at all x:

and
P.S. You could generate the UnitDamaged() calls yourself.
how should i raise a luaUI event in luaRules? ...
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

synced -> unsynced relay
Script.LuaUI.UnitDamaged(...)

I don't see what your problem is with having a lua explosion and
unit death explosions (for those whose health drops enough).
Chain explosions probably wasn't the right example, but having
a projectile explosion effect and a unit's death explosion caused
by the damage is a common sight, no?

P.S. To avoid confusion, by "all-LUA" explosion, I'm talking
about not using a corroach unit to make the bomb's explosion.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

trepan wrote:synced -> unsynced relay
Script.LuaUI.UnitDamaged(...)
it is (crash) bugged >_>
and iirc, only your widget would recieve it not all ones ...

and atm my problem is/was that I can't raise the corroach explosion into the height. Btw it is not that i don't workaround it (A selfd on planes do it too), nor that it annoys me, it only wonders me ;)

PS: my (nearly finished) LuaParticleSystem can easily extended to an explosion system (only round troughs will be a problem).
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

1. Post your code so that the crash can be fixed
(preferably with an explanation on how to reproduce the crash)

2. A Script.LuaUI.UnitDamaged() call is sent to all LuaUI widgets that use it.

P.S. My quick test was simply this (needs the cmd_doline gadget):
.luarules urun Script.LuaUI.UnitDamaged(0, 0, 0, 0, false)
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Post by jK »

1. I commited a while ago a version of the morph gadget + a new rank gadget in ca sandbox, which crashs after the usage of Script. and it seems >Maelstrom< found the reason why it does so.

2. I always thought you need to use "Handler:RegisterGlobal()" to catch such events :oops:
Last edited by jK on 21 Aug 2007, 17:50, edited 2 times in total.
Post Reply

Return to “Game Development”