Devestators

Description

This page belongs to the devestator registration structure when creating your own devestators in the lua/wos/advswl/devestators folder of the addon.

The syntax is similar to that of Force Powers. All properties are always registered within the devestator and accessible at any time, but only select properties are networked.

Parameters

name [string]

The name of the devestator.


icon [string]

The characters that will be used for quick reference in the devestator quick swap bar.

This property has had no use since the Calm of Fate update, but it is kept for future updating.

image [string]

The path of the material or png that will be used for the devestator in the devestator selection menu.

Will be blank if not defined
All paths are relative to the materials folder by default, so don't include that part.

description [string]

The description of the devestator that will appear in the devestator selection menu.

Defaults to "No Description" if not defined.

help [string]

The help text on how to use the devestator that will appear in the devestator selection menu when you right click on it.

This will do nothing if not defined.

action [function]

The function that activates when you press your alternate fire button. The only argument is the weapon (self) and it is only called on the SERVER

Example

A simple devestator that heals the current owner to full health when used

action = function( self )     local owner = self.Owner     if not IsValid( owner ) then return end     self.Owner:SetHealth( self.Owner:GetMaxHealth() )end,
wikOS powered By wiltOS Technologies