MultiWallDodge!

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

MonsOlympus

Active Member
May 27, 2004
2,225
0
36
43
Ok guys Ive been trying to work out how to add multiple wall dodges and am having no luck.

In my pawn Ive got dodge, perform dodge overriden.
In my controller class Ive got PlayerWalking/ProcessMove overriden.
In my PlayerInput class Ive got Actor.eDoubleClickDir CheckForDoubleClickMove overriden.

Ok so that was just letting you know Im trying to do this through direct access not in a mutator. Ive been trying to work out how the dodging code works but am at a loss, I added debug code in an attempt to find out whats going on but its very slow going.

I just thought Id post here and see if anyone knows anything about this dodge code and could maybe give me some help or links to documentation. I hope I havent overlooked any.

If I manage to get any code that I think might be useful I'll post it but atm my code is nothing more than a mangled version of the original functions. I did manage to get walldodges working when you are on the ground but close to the wall but this was kinda a lucky side effect of trial and error.

Please any help would be greatly appreciated.
 

MonsOlympus

Active Member
May 27, 2004
2,225
0
36
43
Yeah thanks guys, Ive check out your mut wormbo, but as I dont understand the dodge code as it is in the original source Ive got no clue as to how your mutator succesfully makes multiple wall dodges possible.

The way I understand it is the PlayerInput is some kind of psuedo tick/timer code that is executed when a doubleclick is preformed or something to the like. The dodge function seems to control the inital traces and works out the velocitys/angles for direction of the dodge. The Perform dodge seems to do the animations and updates the velocity based on the stuff in dodge.

The main problem Im having is differentiating the dodge code from the wall dodge code, if I could isolate the wall dodge code then this would be much easier. I have the variables sorted out but this is really a mystery as there seems to be doubleclickmove and doubleclickdir as well as doubleclicktime and doubleclicktimer. I know there is an enum which holds all the direction/status of the doubleclickdir but Im not sure what the differences are between None, active and Done.

I'll tidy up my debug code and post some so you can see how Im trying to work out what the code does so maybe you guys could shed some light on whats the best way to go with debugging. I would really like to understand what the code is doing instead of copying something from wormbos mutator. The main reason I want to do this instead of using the mutator is for compatability reasons as Im already using the custom classes for other functionality, I havent tried using the mut along with the mod Im making but I may or may not run into problems like that.

Thanks for the quick response guys :)
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
The distinction between dodge and wall dodge only happens when actually applying the Velocity change. PHYS_Walking means it's a dodge, PHYS_Falling combined with a successful wall Trace means it's a wall dodge. For my mutator that's irrelevant, though. I only check whether a dodging move was completed and reset the corresponding variable as if the player landed.
 

MonsOlympus

Active Member
May 27, 2004
2,225
0
36
43
Thats what I figured from looking at your mutator. I found what the Active, etc means, turned out to be an enum in actor :notworthy:

http://wiki.beyondunreal.com/wiki/Actor/Enums

Well I know what those are doing now so thats not a huge problem. It seems as though DoubleClickDir in PlayerController seems to equal between 1 and 6 depending on which direction you push, it changes wether or not its a doubleclick but if a doubleclick happens it turns to 6. DoubleClickMove changes only when a doubleclick happens, on a ground dodge it changes for a split second but on a walldodge it changes to a 5 until you hit the ground.

Thats about all Ive worked out so far and am a bit closer to getting what Im looking for. :2thumb:
 

MonsOlympus

Active Member
May 27, 2004
2,225
0
36
43
I cant be sure, I think this is the code responsible for getting the mutliwalldodges to work.

From my custom playerinput class, this is the only altered piece of code, from:
Code:
function Actor.eDoubleClickDir CheckForDoubleClickMove(float DeltaTime)
Code:
	if (DoubleClickTime > 0.0)
	{
		if ((bEnableWallDodging)&&(DoubleClickDir >= DCLICK_Active))
		{
				DoubleClickTimer = 0;
				DoubleClickTimer = DoubleClickTime;
				DoubleClickDir = DCLICK_None;
		}
		if (DoubleClickDir == DCLICK_Active)
		{
.....
Continues as normal to the end of the function. bEnableWallDodging is always true I just put that in there incase I want to disable it later etc.

http://wiki.beyondunreal.com/wiki/Maintaining_Compatibility

This link also pushed me in the right direction. I did alot of searches on dodges around on the forums but the links Ive posted and the things said here are probably the most useful. Unless ofcoarse Ive got no clue what Im on about so I'll leave it up to you guys to correct me ;)
 
Last edited: