Simple Class System

HOW TO USE THIS PACKAGE:

This package relies on the spawnUserScript, it should be on your User template.
Add the User Class Select to your User template.
Configure the classes and decide when to show the class select menu.

The property classTemplate accepts an array of templates - these should correspond to your classes.

  • You can change the Player properties (like health, speed, and jump height) for each template to easily customize classes.
  • The properties classNames and classDescription are what appear on the buttons on the widget.

You can use the inventoryDefaultScript to give each class items or weapons.

  • Any inventoryDefaultScripts you add to the player templates will give those items to that class.
  • Using the inventoryDefaultScript on the User template will give that item to all classes.

You can use showOnInit to show this menu or use any external event to call ShowClassSelectWidget.

  • If you only use showOnIt, the User will select a class only once when they join the game.
  • If you use the OnRoundStart event on the gamescript (likely on the gameController entity), the User will select a class at the start of each round.
  • If you use the onUserDied event on the spawnUserScript (likely on the User template), the User will select a class each time they die.

Hopefully the tooltips on the other properties are clear enough and the comments throughout the userClassSelectScript might be helpful for understanding how it works.

If you run into any issues or have feedback find me (ekelrock) on the Cryata Discord.

3 Likes

Duplicate Templates found:

  • Gun
  • Player Health
  • User Inventory

suggestion for install wording

  1. Install: the following templates on User
  • User Class Select
  • User Inventory
  • User Spawn

Thanks sinjin – Not sure what’s up with those duplicate templates but I’ll take a look. And I’ll definitely be updating the instructions, those were just the quick notes I typed up in one of the scripts to remind myself later lol

1 Like