Please read the following description before using this.
The basic story behind this mutator is that I wanted an onHurt hook, but that doesn’t exist in the API. There doesn’t seem to be a straightforward way to check for collisions in the current API either, but whipping that up was easier than a theoretical onHurt, so thus the birth of this mutator, good enough.
This mutator isn’t really meant to be used standalone. Rather, it’s meant to be used as a library. A simple example of this is in player_collision_example.mut
. Only player_collision_detector.mut
and player_collision_detector_interface.asc
are needed if you plan to use it.
———
COLLIDE::getDetector(bool debug = false) returns the object where you can interact with the detector. The default argument for debug is false, but you can pass true to log messages whenever the function fails for any reason. If successful, the returned object contains the following methods:
It is important to note that the methods described above only apply to the local player. This does not matter if you use them in a hook that is called for all players (e.g., onLevelLoad, onLevelBegin), but if these are not your use cases then you must consider this. On the other hand, the methods listed below will affect all players:
behavior
and playerHandling
property. If you have any custom weapon scripts, you must be careful on when to call it (perhaps the simplest solution is to use TimerV).behavior
and playerHandling
property of all weapons at the time startDetecting was called.———
Any function can be passed as the first argument to setHook as long it has the signature void function(jjPLAYER@ victim, jjPLAYER@ collider, COLLIDE::Collide collision) The first two parameters are self-explanatory. The third parameter is the type of collision that gets passed in as an argument. Possible values are:———
Change Log:
2/19/2025 10PM UTC
- Fixed bugs that caused some weapons to be in an infinite exploding state and Gun8 not firing for the local player.
2/19/2025 6AM UTC
- First release
![]() |
Player-to-Player Collision Detector | 7.29 kB |
![]() |
1.38 kB | |
![]() |
0.93 kB |
You must log in to write a comment or review.
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.