Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: UDK Melee Weapon Video Tutorial

  1. #1
    draxov
    Guest

    Post UDK Melee Weapon Video Tutorial

    Hi everyone,

    I made a tutorial on how to make a melee weapon in UDK using trace sockets. I thought it would be good to post it here so everyone can look at it, it's a video as well as having a PDF companion to it.

    It tells you:
    • How to rig the model in blender
    • Export it as an FBX
    • Import it into UDK
    • Setting it up in UDK
    • Scripting the melee weapon with X-Editor


    Here is the Video:


    The PDF Companion:
    http://draxov.com/UDKMeleeWeaponTutorial.pdf

    The Programs used in this are all free and license free as well:
    Blender 2.63a - http://www.blender.org/dl/http://dow...lender2.63/ble...
    UDK May 2012 - http://download.udk.com/UDKInstall-2012-05-BETA.exe
    Unreal X-Editor - http://unrealxeditor.wordpress.com/downloads/

    Also if you wish to download the files used, they are here - http://draxov.com/UDKMeleeWeaponTutorial.zip

    Please enjoy and give me any feedback you can. Thanks for reading!

  2. #2
    Derp
    Guest
    A helpful tutorial for the users who don't like text. Good work on it, I'm happy to see it isn't a short video as well,

  3. #3
    draxov
    Guest
    Thanks for the feedback! I'm glad you like the length of it, I was worried it was too long.

  4. #4
    vluz
    Guest
    Thanks for the tutorial, just what I was looking for.

  5. #5
    UbisoftMega
    Guest
    Hey Mate i posted on the Youtube version but i try to get you here.
    These errors are a bit odd.

    (79) FinishAnim is not allowed here

    (43) 'IF' is not allowed here

    Thanks man helps a lot!

  6. #6
    reinrag
    Guest
    Quote Originally Posted by UbisoftMega View Post
    Hey Mate i posted on the Youtube version but i try to get you here.
    These errors are a bit odd.

    (79) FinishAnim is not allowed here

    (43) 'IF' is not allowed here

    Thanks man helps a lot!
    I'm pretty sure you've done something wrong, i've watched a bit of his video and the if statements are properly placed inside a function.

  7. #7
    bluemoon6
    Guest
    I had no Idea Blenders FBX export was now compatible with UDK. Thanks, that info alone will help me a great deal.

  8. #8
    Neongho
    Guest
    Your code could be 2 times smaller , and accomplish absolutely the same.

    You don't really have to use " ammo " neither " FireStates array " , that's just not needed.

  9. #9
    Chosker
    Guest
    good tutorial, nice for anyone that wants to get started on this. just a few pointers:
    - you run a trace from the blade start to end. if the attack is really fast (or the player is experience low framerate) the attack could go right through the enemy and miss him (one frame the sword is before him, next frame it's already past him). consider doing more traces along the blade that instead, go from their current position to their last frame's position (and so, you run a trace along the blade's trajectory instead)
    - if you follow my advice on the previous point consider the following: running traces per tick could be overkill if there's a lot of Pawns attacking on-screen at once. better run a Timer.
    - I find it weird that you remove ammo from the weapon if it hits multiple enemies on the same swing. debatable though

  10. #10
    UbisoftMega
    Guest
    Quote Originally Posted by reinrag View Post
    I'm pretty sure you've done something wrong, i've watched a bit of his video and the if statements are properly placed inside a function.
    I really don't want to be a bother but if you wouldn't mind helping me that would be great can you look over my attempted script THANK YOU!

    class BarWeapon extends UTWeapon;

    var array<Actor> HitArray;

    var name StartSocket, EndSocket;

    simulated state WeaponFiring{
    simulated event BeginState ( name PreviousStateName ){
    if ( !HasAmmo(CurrentFireMode ) ) {
    WeaponEmpty();
    Return;
    }

    `LogInv("PreviousStateName:" @ PreviousStateName);

    PlayFireEffects(CurrentFireMode);
    SetTimer(GetFireinterval(CurrentFireMode), false, 'RefireCheckTimer');
    }

    simulated simulated event EndState ( name NextStateName )
    {
    HitArray.Length = 0;
    `LogInv("NextStateName:" @ NextStateName);
    ClearTimer('RefireStateTimer');
    NotifyWeaponFinishedFiring ( CurrentFireMode );
    return;
    }

    simulated function RefireCheckTimer()
    {
    if (bWeaponPutDown);
    `LogInv("Weapon put down requested during fire, put down now");
    PutDownWeapon();
    return;
    }

    if ( ShouldRefire() ){
    HitArray.Length = 0;
    PlayFireEffects(CurrentFireMode);
    SetTimer(GetFireInterval(CurrentFireMode), false, 'RefireCheckTimer');
    }

    HandleFinishedFiring();
    return;
    }

    function Tick( Float DeltaSeconds ){
    local vector Start, End;

    SkeletalMeshComponent(Mesh).GetSocketWorldLocation AndRotation(StartSocket, Start);
    SkeletalMeshComponent(Mesh).GetSocketWorldLocation AndRotation(EndSocket, End);

    WeaponTrace(End, Start);
    }

    simulated event WeaponTrace(vector End, vector Start)
    {
    Local vector HitLocation, Hitnormal;
    local Actor HitActor;

    HitActor = Trace(HitLocation, HitNormal, End, Start, true);

    if (HitActor != none){
    if (HitArray.Find(HitActor) == INDEX_NONE && HitActor.bCanBeDamaged){
    HitActor.TakeDamage(InstantHitDamage[CurrentFireMode], Pawn(Owner).Controller, HitLocation, Velocity * 100.f, class 'Bar_Damage');
    AmmoCount -= ShotCost[CurrentFireMode];
    HitArray.AddItem(HitActor);
    }

    }

    }

    Begin:
    FinishAnim(AnimNodeSequence(SkeletalMeshComponent( Mesh).FindAnimNode(WeaponFireAnim[CurrentFireMode])));

    }



    sorry about the formating i have no idea what im doing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •