Grapple points

[Open Assets] Grapple points 2.0

The script was refactored, with improved way of customization. Look into GrappleExample.pk3 for reference. Note that this is breaking update, so any maps that have previous "grapling" lua's will need to be changed in order to use this version. This is not required though, new version will not break pre 2.0 one if both scripts are loaded

Karlson map has been removed, updated version will probably be out in a different post soon
Add boss waypoints on map so race positions should work more or less correctly now (didn't know boss waypoints were a thing until recently)
  • Now when player release graple point, their vertical momentum gets capped and cut off speed is added to horizontal momentum. This can be customized/disabled with A_SetGrapleZMomentumCutoff. Var1 enables/disables this behavior, and var2 controls maximum vertical momentum (default value is 40*FRACUNIT)
  • Tip is now shows every time map with grapling is loaded (similar to acrobasics trick reminder), and also it can be disabled with showgrapletip cvar set to Off.
  • Map: made graple point sectors intangible so they don't get in way
Change mapthingnum's to avoid conflicts
(now i'm thinking that i should've kept map and lua as separate addons)
After a playtest with multiple players there popped up a problem that players get confused by grapling mechanic and can't complete map or just suffer from it, so now map layout is updated in a way that grapling mechanic is optional but using it makes you go faster
Now angle checking is done via dot product, which works much better
There was some logical issue in angle checking that caused picking incorrect closest graple points. Should be fixed now
  • Biasing player forward has been replaced by angle checking. If graple point is considered out of player sight (player's angle - angle to graple point > angle check value) it is ignored. It is enabled by default and default angle check value is 90 (from -90 to 90) so graple points behind player are ignored. Angle checking, and angle itself can be configured with A_SetGrapleAngleCheck, where var1 value enables/disables the check and var2 used to configure angle value (it is just integer, from 1 to 180, not angle_t)
  • Instead of using hardcoded GRAPLE_BIAS constant (used for biasing player forward so graple points ahead prefered), now script uses double graple distance, which should 1) Improve picking closest graple point and 2) Make this biasing work better for graple points with huge graple distance (hardcoded value of 600*FRACUNIT could not help at all).
  • Karlson map is now using extra graple point type for close-placed graple points.
Distance between player and graple indicator no longer changes for different mapobjectscale values. Thanks Patafoin for report
Back
Top