Codename LogoCodename Logo

funkin.backend.scripting.DummyScript

APIWiki

Simple class for empty scripts or scripts whose language isn't imported yet.

Constructor

View in GitHub

new(path:String)

Variables

@:value([])variables:Map<String, Dynamic> = []

Methods

Inherited Variables

Defined by Script

extension:String

Script Extension

fileName:String

Script name (with extension)

@:value(null)path:String = null

Path to the script.

@:value([])remappedNames:Map<String, String> = []

Inherited Methods

Defined by Script

View in GitHub

call(func:String, ?parameters:Array<Dynamic>):Dynamic

Calls the function func defined in the script.

Parameters:

func

Name of the function

parameters

(Optional) Parameters of the function.

Returns:

Result (if void, then null)

View in GitHub

error(text:String, ?additionalInfo:Dynamic):Void

Shows an error from this script.

Parameters:

text

Text of the error (ex: Null Object Reference).

additionalInfo

Additional information you could provide.

View in GitHub

load():Void

Loads the script

View in GitHub

loadFromString(code:String):Script

Loads the code from a string, doesnt really work after the script has been loaded

Parameters:

code

The code.

View in GitHub

onCreate(path:String):Void

View in GitHub

reload():Void

Hot-reloads the script, if possible

View in GitHub

setParent(variable:Dynamic):Void

Sets a script's parent object so that its properties can be accessed easily. Ex: Passing PlayState.instance will allow boyfriend to be typed instead of PlayState.instance.boyfriend.

Parameters:

variable

Parent variable.

View in GitHub

setPublicMap(map:Map<String, Dynamic>):Void

HSCRIPT ONLY FOR NOW Sets the "public" variables map for ScriptPack

View in GitHub

trace(v:Dynamic):Void

Traces something as this script.