TermType: Block - Styxling/Feather GitHub Wiki

A payload system that is malleable enough to work within multiple different game modes.

Inherent methods from TermSuperclass.

block.new(Defenders : Team, Raiders : Team, Part : BasePart, Settings : {})
	-- Creates a new block class
	-- 'Part' should be the primary part of the payload object that all other parts are welded to.
	-- See the module for what the settings are :P

block:step()
	-- Checks for nearby players and does capture and movement logic

block:addSpeedMultiplier(element : {}, multiplier : number)
	-- Incorporates elements into the block's movement logic, utilizing the 'class.values.owner' property of the provided element
	-- The multipliers of all speedMultipliers whose owners match the block's owner are added together and then multiplied against the base speed value


-- For the following 3 methods, in game modes where the block and move in two directions (such as Block Control) negative numbers are used for one side of the track and positives for the other.
block:setPos(x : number)
	-- Moves the block to a position. 0 is the starting position.

block:setDistance(x : number)
	-- Moves the block to a position that is [x] studs away from the starting position.

block:setPercent(x : number)
	-- Moves the block to a position along the track that is [x] percent away from the starting position.

block:destroy()
	-- Destroys the class

Parent

TermBuilder