Project OutFox Wiki
Project OutFox home View the OutFox Wiki source on GitHub Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto mode Back to homepage

NoteField

Contains the receptors and notes that are seen in gameplay. Normally seen in Player actors.

Def.NoteField through lua allows one to create extra NoteFields that aren’t bound to a Player actor.

local receptposnorm = THEME:GetMetric("Player","ReceptorArrowsYStandard")
local receptposreve = THEME:GetMetric("Player","ReceptorArrowsYReverse")
local yoffset = receptposreve-receptposnorm
local notefieldmid = (receptposnorm + receptposreve)/2
local def_dda = THEME:GetMetric("Player","DrawDistanceAfterTargetsPixels")
local def_ddb  = THEME:GetMetric("Player","DrawDistanceBeforeTargetsPixels")

Def.ActorFrame{
	FOV=45,
	InitCommand= function(self) self:zoom(SCREEN_HEIGHT/480):Center() end,
	Def.NoteField{
		Player= PLAYER_1,
		NoteSkin= "Exact3D",
		DrawDistanceAfterTargetsPixels= def_dda,
		DrawDistanceBeforeTargetsPixels= def_ddb,
		YReverseOffsetPixels= yoffset,
		FieldID= 3,
		InitCommand= function(self)
			self:y(notefieldmid)
		end,
	}
}

In the above example, The resulting NoteField is relatively close to what a NoteField in a Player would be like. The NoteSkin chosen is “Exact3D”, while the positioning is based off of theme metrics.

Because Player is set to PLAYER_1, it will also grab the Chart that Player 1 selected and read from Player 1’s input.

Because this NoteField is not drawn by an actual Player actor, Mini won’t zoom the NoteField, and perspective modifiers will do nothing. Those will have to be replicated manually. Check How a Player Manipulates its’ NoteField for more information on how to recreate it.

Table of Contents

Attributes

NameTypeActionDefault
NoteSkinstringThe NoteSkin to use for the NoteField.“default”
DrawDistanceAfterTargetsPixelsfloatHow far back missed notes draw (in pixels)-128
DrawDistanceBeforeTargetsPixelsfloatHow far down the NoteField draws (in pixels)480
YReverseOffsetPixelsfloatThe center-point of the NoteField288
ChartstringChart to load“Invalid” (Grab from chosen Player)
PlayerintPlayer to grab chart and input from0 (Player 1)
InitModsstringModifiers the NoteField start with."" (No modifiers)
FieldIDintWhat ID the NoteField uses (Affects Tornado, Invert, Tipsy, Expand & Beat)0
AutoPlaybooleanAutoPlay the given chart.false