This content may be freely modified and/or maintained by anyone.
Status
Not open for further replies.
Hey, I wanted to add this script to my character to improve its support for levels with Axis2D in it. I just wanted to confirm if there was a way to check and see through lua scripting if the code has already been added to the game. If at some point you guys update and a level is using code that is more up-to-date than my wad, I don't want to be overwriting the code needlessly.
 
That actually reminds me to get the newer code refactor of this released, heh. I'm not sure if the current release version has a way to check that, and I know the current working copy does. (I just need to sit down and fix the slight drifting I've been experiencing ._.)
 
I don't know if there is a way to do this through lua, but is it possible to turn local functions into, like... global functions? It would be nice to call on something like Ax_SnapMobj from a separate lump.
 
We figured out a while back that you can use the rawset function to add the function to the global metatable _G, allowing such a function to be effectively "global":

rawset(_G, "myfunctionname", mylocalfunction)
 
Is there any chance you could do this for your script? I'm just trying to make my character more compatible with any added levels that happen to use Axis2D, so all I really need to do is call on the function externally if it's already available.
 
Alright, this is long overdue, but people actually using it in SUGOI2 means I'm finally pushing out an update with some quality-of-life improvements for scripters. We're now on 1.2.


  • The code has been heavily refactored into an axis2d global, which is now completely accessible from other scripts.
  • Object sliding issues when standing still on circular axes have been fixed.
  • PF_FORCESTRAFE no longer lingers after exiting Axis2D mode.
  • Camera objects should no longer be visible, and cutaway views should now be supported.
  • A new linedef type has been added: 9001 Axis2D Switch Sector. It's set up exactly like an invisible intangible FOF, and when inside you'll switch to the axis defined by the line's X offset. This line has no effect if you aren't already in Axis2D mode, which should make it easier to intersect A2D over 3D sections if you're into that sort of thing.
  • If you use camera tricks to flip the player's direction of motion (see Clock Towers), the player will continue moving forward (now opposite of input) until they release the movement key.
NOTE: Spilled rings and other similar objects no longer switch axes when using the linedef executor method of switching them any more. If you can't update your map to accomodate this, set axis2d.legacymode = true to restore the old behavior.
 
Last edited:
RedEnchilada, i have problem. When i try to play level, it don't show 2D (Axis 2D). It just normal (3D). Help me plz!
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top