Script-Filter
script-filter
is executed every frame if it is determined that the attached marker should be visible.
warning
Because the function is executed every frame when the marker is visible, it can impact FPS significantly if you aren't careful with your logic!
Default Parameters
Parameter | Type | Description |
---|---|---|
marker | Marker | A reference to the marker firing the script. |
Usage
- pack.xml
- script.lua
- Output
pack.xml
<marker ... script-filter="DoSomethingWhenMarkerIsVisible(1)">
<marker ... script-filter="DoSomethingWhenMarkerIsVisible(2)">
script.lua
function DoSomethingWhenMarkerIsVisible(marker, markerTriggerID)
Debug:Print("Marker " .. markerTriggerID " is currently visible")
-- do something else here
end
Example Output
-- If marker 2 is visible:
"Marker 2 is currently visible"
"Marker 2 is currently visible"
"Marker 2 is currently visible"
...