1

(13 replies, posted in Tips & Articles)

You can add new rows or columns on the CharacterSelection prefab. It's located under UFE/GUI/prefabs. Problem with this is that any extra character slots won't fit on the screen because of the big character portraits. So the method for adding more slots depends on how you want your GUI to look (smaller character select slots or smaller portraits, etc.). You can edit the character selection data in the CharacterSelectionScript.cs located under UFE/Scripts (in source edition).

2

(13 replies, posted in Tips & Articles)

J.S.B wrote:

I see you are working on some amazing tutorials. All things that I really needed. If I may suggest 1 tutorial could you create one where it shows how to increase the character limit to show on the character select screen.

I'll take a look at it today. If I remember right, that can be done pretty easily from the GUI scripts.

3

(13 replies, posted in Tips & Articles)

Making the announcer say character's name depending on what character you choose [SOURCE ONLY]

Continuing with the GUI announcer voices, this time we'll make our announcer say our character's name when we pick it. It doesn't need to be the announcer though. It can be the character saying something or anything you like. To do this, you need the SOURCE version of UFE.

[media]https://www.youtube.com/watch?v=ah_iOIli6Vw[/media]

We are editing a lot of core scripts in this tutorial, so be extra careful. We will start up by editing the CharacterInfo.cs located under UFE/Scripts. On line 53 is public AudioClip deathSound; This sound is called when your character gets KO'ed. We are going to make a similar audio clip, but use it in a different way. Add a new empty line after the deathSound and write this on it:

public AudioClip selectSound;

We have now created a new audio clip for the character info, but we still need to edit CharacterEditorWindow.cs (located under UFE/Editor) to be able to add the sound on our Character asset. Again we'll use the death sound as an example. Death sound is located on line 191 and looks like this: characterInfo.deathSound = (AudioClip) EditorGUILayout.ObjectField("Death Sound:", characterInfo.deathSound, typeof(UnityEngine.AudioClip), false); Using this example, we'll make a new line after the death sound and put in code for our sound. It all comes on the same line, even though it doesn't fit on the same line on the forums:

characterInfo.selectSound = (AudioClip) EditorGUILayout.ObjectField("Select Sound:", characterInfo.selectSound, typeof(UnityEngine.AudioClip), false);

If you have done everything correct so far, you should now have new option in the character editor. Drag and drop your sound clip on the Select Sound field:

https://dl.dropboxusercontent.com/u/223629633/AOI.png

So now we have the selection sound, but we are not ready yet. Our sound still needs to be used somewhere. For that we'll edit CharacterSelectionScript.cs located under UFE/Scripts.  This piece of code is on lines 110-112:

if (Input.GetButtonDown(UFE.GetInputReference(selectButton, UFE.config.player1_Inputs))){
                UFE.PlaySound(selectSound);
                UFE.SetPlayer1(UFE.config.characters[p1HoverIndex]);

What this code basically does is: Set Player 1 character and play sound effect, if he presses select button (T by default). We will add our announcer sound clip here too. Create an empty line after that part of the script and add this on it:

UFE.PlaySound(UFE.config.player1Character.selectSound);

Scroll down a bit an around line 121 you will see player 2 version of the same code. You should now be able to do this part by yourself (same as player 1, just change code to player2Character.selectSound. Now the sound clip should play when you pick your character. Reply this thread, if you have any problems with it!

4

(13 replies, posted in Tips & Articles)

Playing other sounds in the title or character select menu than music

Do you want to play a sound effect when player goes to your title screen? Such as the name of your title? How about saying "choose your character" in the character select screen? This can be achieved with some easy UFE coding.

[media]http://youtu.be/rfcoEaoRDgk[/media]

Start by creating a new C# script (right-click, create, C# script). You can also use this script I made and import it to your project.

Rename the script as "MenuSoundScript.cs" and open the script in MonoDevelop (or your script editor of choice) and type in:

using UnityEngine;
using System.Collections;

public class MenuSoundScript : MonoBehaviour {

public AudioClip introSound;

void Start () {
UFE.PlaySound(introSound);
}
}

Next go to your GUI prefabs folder (UFE/GUI/prefabs) and drag and drop your script on any of the prefebs in the inspector (obviously the one you want to add the sound clip on). Then drag and drop any audio file in the "Intro Sound" field. Now it should be working as intended and your prefab should be looking something like this:

http://dl.dropboxusercontent.com/u/223629633/introscreenprefab.png

Educational

What does the script do?

In short:
First we make a new class called MenuSoundScript (class name must match with the script's file name) then we add a public audio clip called Intro Sound, so we can set a sound for our script to play. Then we use void to specify that our Method (Start) will return no value.

UFE.PlaySound is part of the UFE script. It plays a sound effect on the main camera at current sound level. Will only be played, if sound effects are enabled in the options menu.

5

(13 replies, posted in Tips & Articles)

I will post here tutorials every time I make something useful for my project. Tutorials will work on any version of Universal Fighting Engine unless they are tagged with [SOURCE ONLY]. Tutorials are always compatible with the free version of Unity.

List of tutorials:

User Interface:

6

(11 replies, posted in Showcase)

J.S.B wrote:

Wing Chun inspired by Ip man you mean?

Yes. The movie with Donnie Yen was pretty good.

7

(11 replies, posted in Showcase)

I love it! Is there Wing Chun?

8

(11 replies, posted in Showcase)

User has deleted the video. hmm

9

(2 replies, posted in Suggestions)

The circle is actually not that big of a problem. Mainly because I have 18/7 Jump Force/length, so it's nearly impossible to get hit by it in the air when you are not supposed to. But yeah, it's a bit of a duct tape solution at the moment.

http://dl.dropboxusercontent.com/u/223629633/super.png

This is the main problem with this setup. The particle will always go to the right. New projectile type, that doesn't do anything to the particle system might work. Just applies movement speed on it (if the particle grows by itself, you could set the speed to 0).

10

(2 replies, posted in Suggestions)

So, I have this "laser projectile" super I made. Couldn't make it as a projectile, so I just added the particle on the move itself and set the hitboxes according to that.

[media]https://www.youtube.com/watch?v=3-7M4MM5TbE[/media]

It works fine as long as you are facing to the right. If you are facing to the other way, the "projectile" will still go to the same way as when facing right. I can't mirror the models as it causes clipping. "Mirror particles" would be a neat tickbox.