Create an ability
A WCS ability/skill is a class that, when instantiated, gets bound to a character. To define the behavior of your ability you override the default methods.
Let's make a file/script attack
and register our first ability:
- TypeScript
- Luau
attack.ts
import { Skill, SkillDecorator } from "@rbxts/wcs";
@SkillDecorator
export class Attack extends Skill {}
attack.lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local WCS = require(ReplicatedStorage.WCS)
local Attack = WCS.RegisterSkill("Attack")
return Attack
Here is how simple it is to create a whole new ability! Worth to mention, this is where you get first syntactical difference between typescript and luau. Here is where you can view all syntactical differences.