Vous êtes sur la page 1sur 11

EASY SWORD COMBINATION ATTACK [ESCA] DOCUMENTATION

OVERVIEW:
Thanks for BUY ESCA ASSET , ESCA ASSET IS UNITY TOOL CAN HELP YOU TO
MAKE YOUR PLAYER CAN COMBINATION ATTACK WITH SWORD AND CAN
APPLY DAMAGE TO ENEMY
Changelog :
Version 1.0 features :
-add easy sword attack combination
- add blood effect
-add enemy damage and dead enemy
- add reward killed
-- add enemy health
- sword attack with sound and dead sound and received attack sound system;

TUTORIAL :
1. SETUP MODEL
First Your model must Import as Humanoid Rig IN Unity , you can Rig your model to make
this as humanoid
in this asset is have demo Guard Model as humanoid model

2. SETUP PLAYER

Drag this model to Unity hirarcy and rename Gameobject as Player

3. ASSIGN
PLAYER
SCRIPT
CONTROLLER
Attack
EBAController
Script TO player
game object in
hierarcy
in this controller
have many option you can interact like
-

*PLAYERANIMATOR : YOU MUST DRAG PLAYER IN HIERARCY TO FIELD


*ATTACK STYLE 1,2,3 : this is many sword style you like , this option connect to animator
controller for your player as boolean, in this controller have 3 style controller, if you need
more than 3 style , you can open eab script and but if you need only 3 , skip this:
remove code // from this script

and scroll down , copy script and paste at the bottom after line } of style3 controller and
rename 3 as 4 .... in your paste script

*SETUP STYLE ANIMATION


CLICK PROJECT WINDOW UNITY
CLICK RIGHT MOUSE AND SELECT CREATE>ANIMATOR
AND RENAME THIS AS PLAYER
, DRAG THIS TO YOUR PLAYER OBJECT IN HIERARCY
, AND CLICK YOUR PLAYER HIERARCY
, IN THIS SCENE WINDOW YOU GET NEW WINDOW ANIMATOR CLICK THIS

,, you must have idle , style1 , 2 .... animation file


drag your aniomation to base layer
- rename idle as idle
style 1 as style1 ..
like screen shot
right click idle and set as default layerstate and idle now turn to yellow color
next
in animator window click + icon

and select bool , and rename attackstyle1,attackstyle2,attackstyle3;

* Unlock Atk 2,3 : This is if you need lock your style and you can add event reward (to unlock
style you lock) after killed enemy
but if do not need to lock this style you must check unlock option like

in unlock style have two option unlock attack 2 and 3 , but ist must same as attackstyle
, if you add more style like 5 , unlock style mush 5 to work
,if more 3 you must remove code // from top script eabcontroller

* Playerposition and BACKTOPOSITION option


player[position : its empty gameobject with position back player you need
(i mean you do not need this , but its can helping for to make cutscene ,its using for demo
after attack player back to position to keep player moving to out fromcamera)
if you do not need you must uncheck this two option

*have audio and sword audio : if you need add sound to your sword ,you must check
haveaudio option , and assign swordaudio file from your project to field
if you do nod need audio leave this
*

4. assign sword to player and setup sword


idrag sword model to player hand child or arm child,
in demo i am using cube as sword

and chnge positon


sword fit to finger
your model
like this

after this
click sword object in hierarcy and see inspector
you must add tag sword and check sword tag to game gameobject

after this in inspector click add component and select box collider and check as trigger

5 . SETUP ENEMY
*Drag guard model from asset to hierarcy and rename to enemy or etc
-create animator controller rename its as enemy and drag to enemy gameobject hierarcy
- assign or drag script swordcollide to enemy gameobject
- add component speherecollider to enemy gameobject and check as trigger

* Setup SwordCollide controller script


- drag enemy object hierarcy to Anim slot

notes:
-in this option have receiveblood = if you do not need enemy show blood like age under 18th ,
you can uncheck this
- in this option you see HAVE AUDIO option = its controller audio enemy for received
attack and dead sound , if you need audio you must assign field slot of getattacksound and
dead sound ,but if do not need sound or mute you can leave sound slot
-NODEAD OPTION : ITS INFINITE HEALTH FOR ENEMY , if you enable that after
enemy dead enemy get health again
- show health option = if you need show health of enemy you can enable it and set position of
health
-Have reward option = enable this if you need reward after killed enemy this connected to
sword style attack unlocked
- max number reward = its control of many reward you need
-rewardcontrol = its connected to player ,who get reward (assign player to it

- ATTACK BUUTON :
DEFAULT IN EDITOR ITS MOUSE LEFT BUTTON TO ATTACK IF YOU NEED TO
CHANGE ITS TO BUTTON LIKE SPACE ,CTRL .ALT OR ETC FOLLOW THIS GUIDE:
* GOTO UNITY MENUBAR SELECT EDIT>PROJECT SELECTION>INPUT
-ADD NEW KEY INPUT ,RENAME THIS AS attack
example write K to this

after this open EABCONTROLLER SCRIPT and change this line with
with
if (Input.GetAxis ("attack"); && startatk == true) {

TESTING

after setup all


press play in game window to test

More Detail :
You can add contact me , ask or anyting in my email rofikcoga@gmail.com
Add me at facebook : facebook.com/abdul.rofik.7165
Thanks By ROFIKSOFT3D

Vous aimerez peut-être aussi