SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Lua

Reply
 
Thread Tools
DirectionChar for SRB2 2.1 Details »»
DirectionChar for SRB2 2.1
Version: GDI Lach, by Sapheros (That guy that ports) Sapheros is offline
Developer Last Online: May 2018

Category: Version: SRB2 Rating: (1 votes - 3.40 average)
Released: 01-21-2018 Last Update: Never Installs: 2
Scripts Re-Useable Content


It's exactly what you're thinking of, except it's in 2.1 and probably not as perfect as you would think it will be in 2.2. But it is a damn fine attempt.



Veterans of SRB2 will want to turn it off, as this is on by default. You can toggle this by typing the command "directionchar". There is also an option for Player 2 in splitscreen via "directionchar2".

In the cases of the actual coding ported from 2.2's source which was distributed by toaster, directionchar will have no effect in the following scenarios:
  • Exiting the level
  • 2D mode (though probably not Axis2D)
  • NiGHTS Mode
  • A case where the player cannot be controlled
  • Gliding and climbing
  • Analog Mode (which you probably won't use when you add this lua anyways)
  • The player is in their Pain state
  • The player is using the homing attack via CA_HOMINGTHOK
  • Any and all Ring Slinger gametypes (Match, Team Match, CTF, Tag, H&S)
  • Being Carried by an object (You won't have any directional influence on your end most of the time.
  • When you play as HMS.
This SHOULD work for most character situations, including overlays or following objects, IF this lua is added last.



Credits to toaster for the original 2.2 Source.
Credits to LJ Sonik and MPC for assistance in porting.
Credits to MPC for the Splitscreen command and minor bugfixes.
Credits to Lach for making me look lazy and actually try to make this script work as best as possible.


Honorable Mention to Jay with the older versions of this script using an overlay, thanks to some discoveries made from his older coding, we did manage to learn about interpolating issues with MD2s.

Download Now

File Type: lua 2.1directionchar.lua (4.9 KB, 425 views)

Screenshots

Click image for larger version

Name:	srb20173.gif
Views:	2416
Size:	6.87 MB
ID:	12259  

Supporters / CoAuthors

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 01-24-2018   #2
Prime 2.0
Grape flavored
Administrator
 
Prime 2.0's Avatar
Default

Welcome to Releases!
__________________
Science tells us that nothing can be proven, only rendered more likely to be true. If we do not question what we already know, how can we know, much less admit, when we're wrong? Such things are vital to progress.
Prime 2.0 is offline   Reply With Quote
Old 01-24-2018   #3
toaster
トースタちゃん
 
toaster's Avatar
Default

Thank you!! I'm glad this is out there, and that everyone has an opportunity to play with this to see how it may be whilst waiting for the real thing.

For best 2.2-esque results, combine with FuriousFox's Auto-Brake script.
__________________
Quote:
<fickle> giant robo-hood that rips the map apart with her bare hands

Last edited by toaster; 01-24-2018 at 03:06 PM.
toaster is online now   Reply With Quote
Old 01-24-2018   #4
U L T R A
 
U L T R A's Avatar
Default Send Nudes of 2.2

Send Nudes of 2.2
U L T R A is offline   Reply With Quote
Old 01-24-2018   #5
RomioTheBadass
PK3 Fetishist
 
RomioTheBadass's Avatar
Default

Here's me trying the mod, took me some time to get used to it as someone who tried analog mode before, Not sure how new players are going to find this, But I Probably shouldn't be comparing it Analog mode, that thing is a mess anyways and I'm not sure why it's still kept in SRB2 other than for Joysticks, Just leads to Confusion.

Otherwise a neat visual improvement.
RomioTheBadass is offline   Reply With Quote
Old 01-24-2018   #6
Goldenhog
Wandering Protagonist
 
Goldenhog's Avatar
Default

"Veterans of SRB2 will want to turn it off"
Man, you weren't joking. No disrespect intended to Sappheros for the porting job or the devs who implemented DirectionChar but there's something about the constant direction switching that makes it awkward for me to play, it's like it's flickering between Analog and regular mode and I can't get used to it. And the way the character auto-aims forward when not moving and how the thok still goes in the direction of the camera just feels wrong.

But yeah this is explicitly aimed at new players which I'm not so my opinion on it is probably not worth a whole lot. At least it lets me confirm I won't want this on when 2.2 happens.
__________________
Quote:
Originally Posted by Asagi Asagiri
I need power over the people! The stupid, STUPID people!
Goldenhog is offline   Reply With Quote
Old 01-24-2018   #7
Sapheros
That guy that ports
Permanently Banned
Default

Honestly I wouldn't blame you, but at the same time... it's so perfect for me.

The ability to have a camera that doesn't work like shit for analog mode is probably the best thing visually for me, but at the same token, a lot of mods that were working with this script kinda throw me off when they're based on the camera's angle, by 2.2, i'm sure most modders will be able to work with what it can do there in the case of the player's angled direction, but eh.
Sapheros is offline   Reply With Quote
Old 01-24-2018   #8
Elyos03
 
Elyos03's Avatar
Default

The future today. First FSonic now this. But something's wrong here.
https://imgur.com/a/VVh9r
__________________
2.2 is the REAL 2.1. at least for me
Elyos03 is offline   Reply With Quote
Old 01-24-2018   #9
Lach
hop
 
Lach's Avatar
Default

Quote:
Originally Posted by Sapheros View Post
a lot of mods that were working with this script kinda throw me off when they're based on the camera's angle, by 2.2, i'm sure most modders will be able to work with what it can do there in the case of the player's angled direction, but eh.
The exploit we're using in this script modifies player.mo.angle, which is why depending on the order of the files you add, mods that rely on player.mo.angle may function differently. I think it's safe to bet that in 2.2, the player's angle will be drawn based on player.drawangle regardless of what player.mo.angle is, so this will not be a problem. Modders will most likely be able to use either player.drawangle for the angle the player is facing or player.mo.angle for the angle the camera is facing.

EDIT:

Quote:
Originally Posted by Elyos03 View Post
I'm fairly certain I included a check for this when I contributed. I guess Saph didn't port all my fixes over.

Last edited by Lach; 01-24-2018 at 07:03 PM.
Lach is offline   Reply With Quote
Old 01-24-2018   #10
Fres
oof
 
Fres's Avatar
Default

I noticed the list says it has no effect on HMS. Just curious, why is that?
__________________
Quote:
Originally Posted by GreenKnight9000 View Post
HOLY MCCHICKEN FLAVOURED TITTY SPRINKLES
Fres is offline   Reply With Quote
Old 01-24-2018   #11
MK.exe
The one and only!
 
MK.exe's Avatar
Default

Nice, now i don't have to see sonics ass all the time

Quote:
Originally Posted by Fres View Post
I noticed the list says it has no effect on HMS. Just curious, why is that?
Yeah..... Why? probably a joke
__________________
Considered Milestones:
Hit a 180 Rail shot
1st person to have a map in releases with Slopes
MK.exe is offline   Reply With Quote
Old 01-24-2018   #12
Zwip-Zwap Zapony
Please just call me Zappy.
 
Zwip-Zwap Zapony's Avatar
Default

Quote:
Originally Posted by Fres View Post
I noticed the list says it has no effect on HMS. Just curious, why is that?
I'm not quite sure, but I imagine it would be because this might affect the player's object's rotation while HMS123311 might use the player's object's rotation for its special abilities in some way, thus causing a lot of strange/unexpected behaviour if the player's object turns around from this script when tapping different directions.
Zwip-Zwap Zapony is offline   Reply With Quote
Old 01-24-2018   #13
Sapheros
That guy that ports
Permanently Banned
Default

For some unknown reason HMS just cries out a validity error that NO other characters have when using directionchar, thus breaking it while he's active. So to prevent anyone from making that silly bug report, I included it as something that you can't have control over.

As for that nights mode gif... uh... just fixed that! Turns out I may have had to make the hack directionchar uses to not be used once nights mode is happening upon mapload... so... yeah... I'm surprised not even the judges noticed this before release... and even then... I'm surprised I didn't notice this before even submitting...
Sapheros is offline   Reply With Quote
Old 01-29-2018   #14
QuickWolfPT
 
QuickWolfPT's Avatar
Default

Am i the only one having the character return to the original orientation once hurt? like i get hurt and it's like i don't have the lua loaded. i have to toggle it off and on again to return to the way it should be

Last edited by QuickWolfPT; 01-29-2018 at 11:41 PM.
QuickWolfPT is offline   Reply With Quote
Old 01-30-2018   #15
Sapheros
That guy that ports
Permanently Banned
Default

I... uh... actually fixed this not too long ago after i noticed the bug, after fixing that NiGHTS issue, /this/ issue came up. The fix has just been uploaded, and I promise there shouldn't be anymore vanilla-related bugs.
Sapheros is offline   Reply With Quote
Old 02-01-2018   #16
Snowy
PersistantRubine
 
Snowy's Avatar
Default

Quote:
I... uh... actually fixed this not too long ago after i noticed the bug, after fixing that NiGHTS issue, /this/ issue came up. The fix has just been uploaded, and I promise there shouldn't be anymore vanilla-related bugs.
Apologies for this, but it doesn't seem to be fixed- I came back and saw this post, and tried the wad, only for the character's orientation to reset after I got hit once.
Snowy is offline   Reply With Quote
Old 04-08-2018   #17
Sapheros
That guy that ports
Permanently Banned
Default

So with the release of TSonic, it has come to my attention directionchar isn't working properly with it's new homing attack. This is due to my bad coding trying to implement something Lach made and wanted me to use, the implementation is so bad that Lach really should have been the uploader of this and not me. Self Deprecation aside, I've decided to change the name of 2.2 directionchar. Because this isn't 2.2, this is 2.1, and some of the changes when ported over needed to have another look with how 2.1 works. So now the lua file will be named 2.1directionchar, and any 2.2 directionchar file will now be considered outdated. Aside from some obvious coding improvements from the older version. This version has a few new changes from the 2.2 backport.

  • Skidding now has a proper effect to directionchar.
  • Water Sliding underwater will have a noticeable extra effect that was originally unimplemented in the original coding.
Apologies for my bad coding, also thanks to Lach for the assistance.
Sapheros is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:48 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.