A script that can be tied to a StickerPack. Create a scripted class that extends StickerPack to use this.

Static methods

staticinit(clsName:String, id:String, ?params:Dynamic):ScriptedStickerPack

Initializes a scripted class instance using the given scripted class name and constructor arguments.

staticlistScriptClasses():Array<String>

Returns a list of all the scripted classes which extend this class.

staticscriptStaticCall(clsName:String, funcName:String):Dynamic

Call a custom static function on a scripted class, by the given name, with the given arguments.

staticscriptStaticGet(clsName:String, fieldName:String):Dynamic

Retrieves a custom static variable on a scripted class, by the given name.

@:value({ fieldValue : null })staticscriptStaticSet(clsName:String, fieldName:String, ?fieldValue:Dynamic):Dynamic

Sets the value of a custom static variable on a scripted class, by the given name.

Constructor

new(id:String, ?params:Dynamic)

Methods

destroy():Void

Polymod HScriptedClass override of destroy.

getRandomStickerPath(last:Bool):String

Polymod HScriptedClass override of getRandomStickerPath.

Retrieve a random sticker from the pack.

Parameters:

last

Whether this will be the last sticker to be placed on the screen.

Returns:

An asset path to a sticker to display.

getStickerPackArtist():String

Polymod HScriptedClass override of getStickerPackArtist.

Return the artist of the sticker pack.

Returns:

The list of artists

getStickerPackName():String

Polymod HScriptedClass override of getStickerPackName.

Return the name of the sticker pack.

Returns:

The name of the sticker pack

getStickers():Array<String>

Polymod HScriptedClass override of getStickers.

Gets a list of all the sticker assets available in the pack.

Returns:

The list of stickers as raw strings.

@:value({ funcArgs : null })scriptCall(funcName:String, ?funcArgs:Array<Dynamic>):Dynamic

Calls a function of the scripted class with the given name and arguments.

scriptGet(varName:String):Dynamic

Retrieves the value of a local variable of a scripted class.

@:value({ varValue : null })scriptSet(varName:String, ?varValue:Dynamic):Dynamic

Directly modifies the value of a local variable of a scripted class.

Inherited Variables

Defined by StickerPack

final_data:StickerData

The full data for this sticker pack.

finalid:String

The internal ID for this sticker pack.

Inherited Methods