View Single Post
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 866

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Feb 3, 2024, 01:45 PM
Seren is offline
Quote:
Originally Posted by Violet CLM View Post
Probably the simplest solution would be to change TNT so it only sets speeds for pickups and bullets, not for other objects such as enemies and bosses. I'm not thinking of any obvious reason that would be a bad idea, but I'd invite people to weigh in.
From a scripting standpoint, the most unusual object I made that intentionally allowed TNT to change its velocity was falling scenery in ground force levels - you might have one such relevant level under the filename breakingCyclones.j2l where it's used for vases. It's neither a pickup nor a bullet; its handling is set to SPECIAL.

On the other hand, I have no doubt I and other people also made countless objects that should really not have their velocity modified from outside, for which we forgot to set isBlastable to false because it's one of the last things you'd ever think of. I wouldn't be against relying on object type to determine whether to apply velocity changes, but it might be important to provide a simple way to restore the original behavior where desirable. onObjectHit does not relay any information about the position of the TNT explosion so currently there is no obvious way to do that.
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.