A beat'em up game source file contains 2 behaviors for player and AI. Combat system, Intelligent AI, Health Pickup, Good player Movement controller with Walk and Run system.
Check the accordion below for more Info.
The demo uses arrow keys for player movement, double press the left and right arrow key to toggle running. Press SpaceBar for kick and Z key for punch.
The player behavior consist of several properties you need to attach it to the main player (static mesh) that will be use as player, not to the animated mesh.
-You can define the pickup health it is the amount of health that will be added to player when player pickups a health item.
-Walk and Run speed.
-You can define the individual damage for kick and punch, this is the damage that will be dealt to the AI when a kick or punch attack is performed by the player.
-Animated will be the animated mesh that will be used as player.
-Health contains the amount of health player will have.
-Hit Sound will contain the name of the sound file that should be played when player gets hit.
Enemy behavior is used for the AI functionality and should be attached to a non animated static object that will be used as AI.
-Enemy Name is the name that will be displayed on the screen when player encounters an enemy.
-Animated is the animated scenenode that will be used for the AI.
-Speed is the amount at which the enemy move or follow the player.
-Attack on Node, is the scene node on which the AI will attack, It's always the player in our case.
-Health is the amount of total health the AI will have.
- Punch and Kick damage is the amount of damage AI will deal to the player when specific attack is performed.
-Chase Radius is the distance, If player goes outside of this distance the AI will start following him.
-Activation Radius is the amount of radius at which the enemy will get activate to attack the enemy.
-HitFx is the scenenode that will be shown when the AI gets a hit.
-HitSound is the name of sound file that should be played when the AI gets a hit.
Almost everything in the code is commented but here are the basic things that you might need to change in the code as per your project.
-Name of the Animations for player and AI inside the behaviors.
-Timing according to the animation duration.
-Need to add more key codes or edit the current one in order to change the controls or to add more attack types.
-Setting of Coppercube variables according to your preferences, this demo uses a lot of CC variables so you might check them.
This demo/source is free to download. If you want you can support my work using the buy me a coffee button up there.
Click the block controls to customize the button.
The back to top button scroll delay before the button shows is set to 200px as the default. As you scroll down the page, it displays after 200px of movement. However you have 4 height options to set via codeditor. 200px, 350px, 500px and 650px for the button to appear.
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopb" for 350 px in the first line of this block HTML
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopc" for 500 px in the first line of this block HTML
Change plugins="Dentaurabacktotopa" to plugins="Dentaurabacktotopd" for 650 px in the first line of this block HTML
IF BUTTON NOT VISIBLE, PLS MOVE SIDEBAR TO THE RESPECTIVE HEIGHT YOU HAVE SET FOR BUTTON TO APPEAR FOR CUSTOMIZATION.
This is a global block and it only needs to be added and configured on one page and the settings will apply to all pages.
This block will be invisible on preview or publish retaining only the button.
BACK TO TOP FUNCTION WILL WORK ONLY AFTER PREVIEW OR PUBLISH.