Hello
I've encountered a problem while scripting HUD for my Stigray project.
The problem:
Script won't let Me manage the value of bar progression via sliderApi.setValue(x) as shown on page Scaleform docs, insted it returns:
attempt to call field 'setProgress' (a nil value) or attempt to index local 'PROGRESS_BAR_API' (a nil value)
since I've tried to make two calls respectively to given result
PROGRESS_BAR_WIDGET.setProgress(26)
PROGRESS_BAR_API.setProgress(26)
Script that make tha call is attached to "data_frame", progress bar is named "PRODUCTION_BAR".
I've changed only name in progressbar widget.
local thisActor = ...
local actorName = scaleform.Actor.name(thisActor);
local container = scaleform.Actor.container(thisActor);
local componentsNumber = scaleform.ContainerComponent.num_actors(container);
local SELECTED_BUILDING = nil
local PROGRESS_BAR = scaleform.ContainerComponent.actor_by_name(container, "PRODUCTION_BAR");
local PROGRESS_BAR_WIDGET = scaleform.Actor.component_by_name(PROGRESS_BAR, "WidgetBase");
local PROGRESS_BAR_API = scaleform.ScriptComponent.script_results(PROGRESS_BAR_WIDGET);
PROGRESS_BAR_WIDGET.setProgress(26)
Thanks in advance
Marcin Wereszczyński