FreedTerror wrote:

I think this tutorial could be improved with code line references so its clear where exactly to put it

It's difficult to give specific code number line references in most tutorials for a variety of reasons: (1) Visual Studio or your IDE of choice may change formatting of scripts automatically from its format when initially downloaded, (2) You may already have customized the code sheet thus changing the line numbers, and (3) The tutorial writer may have altered their code sheets to utilize other modifications thus changing their line numbers.

can you try assigning it to a slower move like round house kick?
And you verified that it didn't output the Debug.Log()?

If that line of code is in the same spot I think it is, then yeah it should be triggering at least the Debug.Log().

Can you run it with the debug text in the hud to show the current move being played and its frames?
I would think it's possible that the jab is finishing before it hits the landing frames.

FreedTerror wrote:

I got an error from the Physics Script
https://i.imgur.com/KgdGxny.png
but it was an easy fix

Yeah this error typically means you've forgotten an Opening or Closing { }.

FreedTerror wrote:

Tested out those changes but didn't get expected result.
https://i.imgur.com/5MPKcOr.gif

Interesting, what happens if the move you set into the slot has a cancel when landing of itself? lol

You could alternatively change the CastMove() call to a Debug.Log("Cancel landing into move."); and see if it's hitting when and only when it should be hitting.

Not sure what'd be causing it, but normally if something spawns at 0,0,0 then it didn't have a reference point/position to spawn to - for some reason.

You're touching on areas of the code I've been afraid of messing around with for 3D style play. Where it would switch to "back-turned" stance should the opponent be facing the +/- 45 degrees from character's back, hopefully seemlessly...

I'm too afraid to be mucking around in Stance code so I'm unsure of your changes here as I haven't messed with that part of UFE well enough. I'll try taking a look at your stuff here later when I find the time though to see if it makes sense to me, or if I can give any further suggestions/tips.

RetroX wrote:

Real quick, would the I be able to use the "OnMove" event on a specific animation frame, or  does it always default to the start of the move?

I normally use the OnMove() as a trigger where I set a bool if the event was hit with the specific move I was looking for. Then in my Update() method I check if that bool is set to true, and the currentMove is still the move I'm looking for, and the currentMove.currentFrame is the frame I'm looking for, then do the thing I want on that frame, otherwise if currentMove isn't the move I'm looking for, set the bool to false.

Something along those lines.

Though I'm always worried such script additions might cause desyncs in online matchmaking due to possible non-tracking of such things... I'm still hazy on the online code.

The area of the code to functionally modify for such an endeavor would be in the PhysicsScript.cs:

                        if (moveSetScript.basicMoves.landing.animMap[0].clip != null
                            && (controlScript.currentMove == null ||
                            (controlScript.currentMove != null && controlScript.currentMove.cancelMoveWheLanding)))
                        {

                            controlScript.isAirRecovering = false;
                            airAnimation = moveSetScript.basicMoves.landing;
                            moveDirection = 0;
                            horizontalJumpForce = 0;
                            isLanding = true;
                            controlScript.KillCurrentMove();
                            delayTime = (Fix64)controlScript.myInfo.physics.landingDelay / (Fix64)UFE.Config.fps;
                            UFE.DelaySynchronizedAction(ResetLanding, delayTime);

                            if (airAnimation.autoSpeed)
                            {
                                animationSpeed = moveSetScript.GetAnimationLength(airAnimation.name) / delayTime;
                            }
                        }

Something like the following (untested code fyi):

In PhysicsScript.cs

                        if (moveSetScript.basicMoves.landing.animMap[0].clip != null
                            && (controlScript.currentMove == null ||
                            (controlScript.currentMove != null && controlScript.currentMove.cancelMoveWheLanding)))
                        {
                            if (controlScript.currentMove.cancelMoveWheLanding && controlScript.currentMove.moveToCancelLanding != null) {
                                controlScript.CastMove(controlScript.currentMove.moveToCancelLanding, true);
                            } else {
                                controlScript.isAirRecovering = false;
                                airAnimation = moveSetScript.basicMoves.landing;
                                moveDirection = 0;
                                horizontalJumpForce = 0;
                                isLanding = true;
                                controlScript.KillCurrentMove();
                                delayTime = (Fix64)controlScript.myInfo.physics.landingDelay / (Fix64)UFE.Config.fps;
                                UFE.DelaySynchronizedAction(ResetLanding, delayTime);

                                if (airAnimation.autoSpeed)
                                {
                                    animationSpeed = moveSetScript.GetAnimationLength(airAnimation.name) / delayTime;
                                }
                            }
                        }

In MoveEditorWindow.cs:

                            moveInfo.cancelMoveWheLanding = EditorGUILayout.Toggle("Cancel Move On Landing", moveInfo.cancelMoveWheLanding, toggleStyle);

to

                            moveInfo.cancelMoveWheLanding = EditorGUILayout.Toggle("Cancel Move On Landing", moveInfo.cancelMoveWheLanding, toggleStyle);
                            if (moveInfo.cancelMoveWheLanding) {
                                moveInfo.moveToCancelLanding = (MoveInfo)EditorGUILayout.ObjectField("Move To Cancel Into:", moveInfo.moveToCancelLanding, typeof(MoveInfo), false);
                            }

and in MoveInfo.cs add anywhere in the class:

        public MoveInfo moveToCancelLanding;

Again, haven't tested it, but that'd be my first attempt.

9

(23 replies, posted in Source Coding)

You can use a custom script as long as it inherits from CharacterSelectionScreen

public class MyCustomCharacterSelectScreen : CharacterSelectionScreen {

}

from there you're free to override any of the methods used within CharacterSelectionScreen as you see fit.

You'll find character selection in the OnCharacterSelectionAllowed method. In there, you can follow the comments for each block of code. I'd recommend just copying the method and pasting it in your custom select screen, replacing virtual with override.

public override void OnCharacterSelectionAllowed(int character Index, int player) {

}

But in short, I'd change the this.GoToNextScreen() to some new method that is something like this.StartCostumeSelection() if you're having the user select costume on the same screen, or otherwise if its on a new screen then just alter the Next Screen to be the costume select screen. Most typically, you'd be on the same screen, so it's just best to update/add an if check that doesn't go to next screen until the costume has been selected.

In terms of handling costume selection, there's no one way to do that, but I'd recommend starting with displaying a panel that renders an option for each costume type in an array for the selected character. Then making it so directional changes change the highlighted option, and pressing Button1 selects that outfit array. Then you can store which outfit was selected and use that to help set the player character and its set costume option.

Set the move to be a low hit type I believe.

I'm unfamiliar with the use of

script.enabled = true;

So I'd reckon that the way you are using it might be an issue.

Also, a suggestion on cleaning up your code might help in debugging:

        foreach (MoveInfo move in enhancedMoves)
        {
            if (cScript.currentMove.moveName == move.moveName)
            {
                script.enabled = true;
                Debug.Log("CheckIfMoveIsEnhanced");
                break;
            }

            script.enabled = false;
            Debug.Log("CheckIfMoveIsNonEnhanced");
        }

That yields the same result as your previous if/else statement in the loop. In this case I can see a logical pathway that could be causing issues.

For example, let's say that you have a list of two moves in the enhancedMoves array [eMove1 and eMove2].

Now, as long as you're performing eMove1 you shouldn't have an issue.
Where you would have an issue is in performing eMove2.
My understanding occurs because of the following reasons:
    (1) The CheckIfMoveIsEnhanced() method is being called every frame.
    (2) On the first Update() tick (frame) that the eMove2 is being performed, it's going to properly register the script.enabled.
    (3) On every proceeding frame that eMove2 is being performed, it's going to hit `script.enabled = false;` because eMove1 which is checked first is not being performed. This will (I presume) end any functionality of the script being disabled. Then on that same frame it will enable it again but because it was previously disabled it will run the Start() and Awake() functions I believe.

So that's some things I see as problematic code in your current script. Sorry I can't be of much more help at this time.

Understandable. I've been sleeping on the 3D Arena gameplay myself since what I'd like to do is get a 3D fighter similar to DOA/VF working within the engine. Presently been hung up on the whole "facing backward" state and how to handle that sad

Looks great so far! It's a feature I'd love to have in my own instance of UFE. Keep up the good work!

Can confirm Ground Collision Mass is the value you're looking to alter.

As a tip, saying "scale is 1" does not provide any sort of sense of scale. It depends on what your model's scale is in your 3D modeling program and what scale you set on the unity importer for the file itself as well. I can have a scale of 1 by adjusting the scale in either my 3D modeling program or the Unity Importer inspector.

15

(50 replies, posted in General)

I had to reselect my character select after upgrading. You probably have to do so as well since Unity acts weird with upgrades sometimes.

16

(8 replies, posted in General)

I might look into it during this weekend on the discord with mind and others. I know he knows about the issue now. It's not something I think would be a quick fix atm. However, if I or someone else figure something out I'm sure we can share here the result and it will be in the next UFE.

17

(8 replies, posted in General)

Ouch. I hadn't done parries yet in my 3S like project otherwise i might have caught this earlier as well.

I wonder if you could some how use the move system and combine it with the new feature to be able to set basic moves to use a move file? Like have a move that does nothing, set it to the parry as a move, then have that move cancel on the first frame into the high parry and another link into the low parry with the requirements for each being the designated parry option?

Just trying to help you brainstorm.

Do you have source as well?

18

(11 replies, posted in General)

Can upload the video to streamable.com

Did you run the MapRecorder.scene ?

20

(6 replies, posted in Jobs)

Hit me up on PM and we can discuss based on what you have ready.

21

(4 replies, posted in General)

Any folder that is labeled Resources should be located as a valid path to your movesets.

So you can have for example

\\Assets\Resources\Characters\moveset1
\\Assets\Characters\Karate\Resources\moveset2

So entering

Characters\moveset1

or

moveset2

should work depending on which moveset you want.

22

(1 replies, posted in Source Coding)

If in the Unity Editor you can just select to see HitBoxesScript.cs' gizmos in either the Scene or Game view.

In-game though out of the Unity Editor, there is no out of the box way to visualize in game. You'll have to code some script to spawn an object/primitive at each hitbox's location with the known parameters and assign a material to render it properly.

23

(11 replies, posted in General)

What's your character's air hit reaction set to? Are there no errors displayed in the console?

The default CharacterSelectScreen should probably be updated to include a basic sub menu for alternate prefab selection.

I tend to be busy with my own projects, but PM me with more details and payment options, and I'll give it some serious consideration.