Hello and welcome to this guide on how to use Varun’s Ability Creator Package!
What does this Package do?
This Package allows you to create your own Abilities and define their behaviour in a simple way.
It includes Scripts that you can use to customise your Ability’s cycle however you like, you can
customise the sounds and effects of your Ability, customise how it damages enemy players, what
effects it applies to them and much more. This Package will work in ANY Team Combat-based Game Templates
(CTF, TDM, etc)
You can find me on the Crayta Discord at Varun#8144 if you have any questions.
I’ll be happy to help
This Package comes with 6 Example Abilities and 5 Ability Types: (more coming soon)
Health Regeneration Shield Ability
Poison Mine Ability
Area of Effect (AOE) Abilities
Read on to learn how to add these example Abilities to your Game and how to create your own Abilities with or without code!
BEFORE YOU BEGIN
There’s stuff you must know before you go about using this Package. These are some key words and concepts
you should know. I’ll try my best to explain it in the easiest way. Stick with me.
By the end, you will be able to create your own Abilities with or without scripting.
Phases of an Ability: The Ability Cycle
There are 4 Phases to any Ability, Cast, Execution, Recovery, Cooldown
What do they mean?
The cast time is the preparation phase before an ability actually happens. If you've seen Dragon Ball Z, think of it as the time (phase) that Goku takes to cup his hands together and say "Kamehameha!"
As soon as the Cast phase ends, the Execution phase begins. This is where the main action of the Ability happens. All the visual and audio effects. Whether it's spawning a burning pool of lava with the sound of melting rocks or opening a portal with a scary sound that you disappear into, or launching a hot beam of Ki, it all happens in the Execution Phase
Additional ability actions that aren't part of the main action are part of the Recovery Phase. Think of it like the player being tired after they've used a powerful Ability, which has slowed them down.
The Cooldown period is the rest period after an Ability is finished being Cast, and cannot be Cast again. Your player has recovered, the Ability progress bar is slowly filling up, and boop! You can use your Ability again. This time period is the Cooldown Phase.
Since this is a Placement Ability System, the Cast time is the time it takes you take to place and confirm the Ability marker and for the Ability to begin.
HOW IT WORKS
There are several Scripts and Templates in this Package but the 4 main ones you need to understand are:
placementAbilityScript/ AOEAbilityScript/ PeripheralAbilityScript/ ArcAbilityScript/ DashAbilityScript
These Scripts are essentially the same, and follow the same structure.
I’ll explain these Scripts in the shortest and simplest way possible. If you want to learn about them in detail,
feel free to message me on the Discord.
This is the base Script for everything that happens in this Package. This Script (and the other AbilityScripts) handles the 4 Phases of the Ability Cycle, the ones I explained above.
This Script handles everything that happens when a player becomes a target of an Ability. It decides how to damage them, how much to damage them, which status effects to inflict, and also adding Scores to the player and their teams when they kill an enemy player using an Ability.
A player shouldn't be damaged by their own Ability, nor should they be able to damage their teammates using their Abilities, this Script takes care of that. However, if you're crazy and you do want the Abilities to damage the creator of the Ability and their teammates, then there are properties called "Should Damage Creator" and "Should Damage Teammates" attached to the Script which you can set to true.
Finally, there's the StatusEffectController Script. This Script allows you to communicate with the Ability Creator's or enemy Players' Player Templates which you can then use to define custom behaviour and effects for your Status Effects. For example, if you want to increase a player's speed when they're Burning (have the Burn Status Effect) and you also would like to change the way the flames look on them while they're burning, or increase/Buff your own player's health/speed while decreasing your enemy's health, or anything very specific that you want to achieve with your Status Effects, then you can do that in the StatusEffectController Script. LET'S BEGIN THE SETUP
For non-Scripters (if you don’t know how to code):
No problem! Follow these steps:
-Once you’ve installed this Package, go to the Templates section of the Library
-You should find Templates that end with “UNZIP”
-These are a part of the Ability Creator Package
-Each Ability has its own UNZIP
-Drag any of the Example UNZIP Templates into your Player Template (The BlankAbility Templates are Blank, you can use any of the other Example UNZIP Templates)
-Do the following steps for any UNZIP Locator:
1. Break the Template's Link 2. Select all the contents inside the UNZIP Locator (The Ability Script Folder and the Ability Locator) and move them out of the UNZIP locator, and into the Player Template 3. Delete the empty UNZIP Locator 4. That's it! Now you can preview any of the Example Abilities. (Glacier, Shield, Poison Mine)
The default bindings for each Example Ability are:
E (interact) for Blank Ability and HellFire Ability
Q (extra1) for Glacier Ability
R (extra2) for Shield Ability
Shift (sprint) for Poison Mine Ability
Press the Ability Button to summon the Placement Marker and Release the Button to Confirm the Placement Marker
NOTE: YOU MUST ADD Player_StatusEffect_UNZIP TO YOUR PLAYER TEMPLATE AND FOLLOW THE 4 UNZIP STEPS
Wait, how do I create my own Abilities?
That’s easy too! Follow these steps:
There are 2 ways to do this: 1) The Do It Yourself Way (4 steps) 2) Using the BlankAbilityTemplates (1 step)
I would recommend going over both of these for better understanding. Once you go over the first method, you can then create Abilities lightning fast using the second method.
The Do It Yourself Way
1. Create your very own Main Ability Template
Create a Locator, add whatever Meshes and Effects you want inside this Locator This is what you will spawn in your Ability during the Execution (Action) Phase For example: A blazing pit of fire, poisonous spikes, anything you can imagine!
2. Add Triggers inside this Locator
Make sure these triggers are big enough to contain the entirety of your Template's size For example: A trigger for poisonous spikes should be big enough to contain all the spikes This is the area in which enemy players will be affected by the Ability after you spawn it. Set this trigger to inactive (set the active property to false) Set the proper size and name for this trigger and leave it be.
IMPORTANT: Make sure you set this Trigger to inactive.
TIP: Superimpose Triggers at places where you want to inflict more Damage. To create Critical Damage areas, try to form areas where if the Enemy Player is present, they will overlap multiple Triggers at once.
3. Add the following Scripts to the Locator
Click on your Locator, then click on Entity->Add->Script and add these Scripts: CreatorProtectionScript AbilityDamageScript SelfDestructScript Tip: You can also open the Scripts section in the Library and drag these Scripts onto the Locator. What these Scripts do has been explained above. Once you add these Scripts to your Locator, go to CreatorProtectionScript Create a Binding for the "On Valid Collision" Event using the + icon In the Entity part, add your Locator In the Script part, add AbilityDamageScript In the Event part, add OnCollision In the "Ability Triggers" property, add all the Triggers you just made in the previous step. Go through the properties and customise the behaviour of your Ability You can select who it should damage, the damage amount and all the effects it should inflict on the enemy Player. You can leave the "Status Effect Locator" on AbilityDamageScript blank as it is, it's optional. The SelfDestructScript is a protection Script to destroy the template in case the Ability Cycle is interrupted in any scenario. The default destruction timer is set to 10 seconds. Now, Template this Locator.
NOTE: Make sure you Template this Locator!
4. Creating the Ability using Blank Ability Script
Final step! Go to your Player Template Follow the 4 UNZIP Steps mentioned above for any Player_Blank()Ability_UNZIP and Player_StatusEffect_UNZIP.
NOTE: The Blank Ability you should UNZIP depends on the type of Ability you want to create:
Player_BlankAbility_UNZIP → for Placement Abilities
Player_BlankArcAbility_UNZIP-> for Arc Abilities
Player_BlankAOEAbility_UNZIP-> for Area of Effect (AOE) Abilities
Player_BlankPeripheralAbility_UNZIP-> for Peripheral Abilities (effective area is about the perimeter)
Player_BlankDashAbility_UNZIP-> for Dash Abilities
After you're done UNZIPPING any one of them, Click on their respective Ability Script Folders Go through the properties and customise the look and sound of your Ability, and choose what Player Buffs you would like the Player to have. You can hover your mouse over the properties to read what each property does. Now, swap the Orange in the "Main Ability Template" with the (Locator) Ability Template you just created in the previous steps.
That’s it! You just created your first Ability without writing a single line of code!
Using the Blank Ability Templates
Now that you’ve understood the first method, this will be much simpler for you.
1. Create your very own Main Ability Template from the BlankAbility(Orange) Templates
The BlankAbility(Orange) Templates already have triggers placed inside them, and all the bindings are already set for you. You only need to take out the orange and add in whatever meshes and effects you want in your Main Ability Template!
Go to any of the BlankAbility(Orange) Templates, click on Template->CreateNewTemplate and name it whatever you want.
The Blank Abilities are your canvas, let your imagination flow!
After you finish creating your Main Ability Template, go to the Ability Script you chose to UNZIP and change the MainAbilityTemplate property to the one you just created!
That’s it! You just created your first Ability again without writing a single line of code!
Give yourself a pat on your back for reaching this far!
Again, if you have any questions, feel free to message me on Discord at Varun#8144
If you want to create more than one Ability, or very specific Abilities, read on
For Scripters: (Intermediate)
Even if you know the basics of Scripting in Crayta, it’s very easy to create highly specific Abilities
using the Ability Creator Package!
I would recommend reading the steps for non-Scripters before reading this part.
Follow these Steps:
Go to your Player Template
Follow the 4 UNZIP Steps for any of the Player_BlankAbility_UNZIP and Player_StatusEffect_UNZIP
Now, go to the “Ability” Script Folder
Create a new Script for your Ability, name it whatever you want.
For example, “MyPlacementAbilityScript”
Copy and paste the contents of any of the Ability Scripts (for example, “placementAbilityScript”) inside your new Script
Match the function and table names for your new Script, replace the function and table names from placementAbilityScript/ AbilityScript
Match the properties for the Placement and Confirm Locators as they were before or create your own and add them to the Placement Locator Properties
Customise the timing, sound and effects of your Ability however you like.
Add the Ability Template you will create to the “Main Ability Template” property
Follow the remaining steps as in the non-Scripter guide and that’s it!
You have created a brand new Ability based on the AbilityScripts!
You can create multiple Abilities this way!
Here’s how you can customise these Scripts even further to create your own Abilities and Status Effects
In the AbilityDamageScript,
Add a boolean property for your new Status Effect For example, shouldBurn Add an if condition for your Status Effect like the ones already present in the Script Send an Event for your Status Effect's function
In the StatusEffectsController Script,
Create a function for the Status Effect Event you sent from AbilityDamageScript Define whatever behaviour you want your Status Effect to inflict on the enemy player or the Ability Creator
That’s it! You have created your own Status Effects and multiple Abilities!
Congratulations on finishing this guide on the Ability Creator Package!
I hope you are now ready to create your own Abilities in Crayta!
-New HellFire Ability
Unleash Hell upon your enemies by calling in an air strike that knocks down your enemies and sets them on fire!
-New Feature: You can now add bonuses to your Ability’s Status Effects!
This update wouldn’t be possible without Mightykho, big thank you to him!
In your Game, you might want to create different Ability and damage bonuses for different classes of players or for players with different levels of experience. For example, in a MOBA or Magical Game, you might want players with the FIRE Element to have higher Burn Damage, let’s say 8% more than other players, as their XP increases, you might want to increase their damage by, let’s say 233% . In a shooter game, you might want to give a Grenade Specialist class higher damage for grenades.
You can do all this in the new update!
Sounds cool! How do I do that?
It’s easy, all this is handled by the EffectBonusScript that comes with the StatusEffectController on Player_StatusEffect_UNZIP. You will see there are properties present for different Status Effects. You can set them to any value you want, and it will add the percentage of that value to the Player Template attached to it. So if you set the burnDamage value in EffectBonusScript to 300, it will increase the burnDamage value by 300%.
You can also do this, by calling the AddBonus function inside EffectBonusScript on the Player from any script in the game.
There’s a template called AbilityBonusExampleShrine that comes with the Package. Drag it into your Game world.
Hit Preview. And walk over the Shrine. Your base Ability damage should have increased by 1000% and your burn damage should have increase by 33%. You will see this printed in your console.
That is how you add Bonuses to your Player Abilities! Just add this one line!
I hope you liked this update, now go on and create the Abilities you want!
- 4 New Ability Types Added
AOE, Peripheral, Arc, Dash
The Dash Ability has further subtypes called Dash, Blink and Smash
Creator Buffs are now easy to apply and define and can now be done from within the AbilityScripts themselves.
You can now create Abilities with complex shapes and triggers because of changes made to the Scripts
Beautifully grouped properties will now ensure that you are never confused while editing your Abilities!
The Ability Creating process is now much more streamlined because of BlankAbility(Orange) Templates
Thank you to Mightykho once again for helping me with this update!
Thank you to Mightykho, Wes, and Slaying for helping me out!