Incisor® Questions and Answers
This document is part of the compiled knowledge base for the Incisor® Software Development Platform.
Any use of this content is subject to the INCISOR® end user license and terms of use agreement.
https://www.incisordev.com/eultua
2025.12.18.13.09.02






----------------------------------------------------------
TABLE OF CONTENTS:
----------------------------------------------------------
Section 1: Containing Directory
Section 2: Pausing Everything when game has 'TILT'
Section 3: Reel Timing and Sequencing in the Slot Template
Section 4: Font Characters Disappearing in Published Project
Section 5: Dragging Buttons
Section 6: Particles Disappearing when the Object is out of the Camera View
Section 7: Remote Hosting On Windows
Section 8: Inline TextBox Graphics and Rich Text
Section 9: Time ramping gameplay
Section 10: Tagging Code that only Runs when in Editor Mode
Section 11: Adding Constructs
Section 12: Changing the Order that FlowStateElements Happen In
Section 13: 9 Slice
Section 14: Generating Sprite Sheets
Section 15: SpriteAnimation
Section 16: Button Clickable Area
Section 17: Sounds not Not Showing Up
Section 18: Graphic Fonts
Section 19: Changing the Browser










----------------------------------------------------------
Section 1: Containing Directory
----------------------------------------------------------


PERSON1--------------------
I'm working in a pre-publish callback in an extension that I'm writing and I'm wondering if there's a way for me to get the current project working directory before I hit publish. 
I know the publish result returns me the publish directory, but I'd like to know the base directory prior to that so that I can check something with that.


PERSON2--------------------
Check out nce.paths.projectPath or nce.paths.splitPath().










----------------------------------------------------------
Section 2: Pausing Everything when game has 'TILT'
----------------------------------------------------------


PERSON1--------------------
On an EGM, the game must pause everything if a door is opened or any tilt condition and resume after the tilt has cleared.
I know all our playable items have the ability to pause but is there a way to do that for the whole game without having to write pause code for each object?
I see the DefinePauseEvent example but it looks like each item will need custom code.


PERSON2--------------------
Yes there is a way, and you don’t need custom code for each object. 
As a default all sequenced items in Incisor are susceptible to all PauseEvents, so you could define a new 'Tilt' PauseEvent, and that would automatically affect everything in code that doesn't call out specific pause immunity.\
You can set nc.defaultPauseImmunity at any point in the code and everything declared after that will automatically get the new PauseImmunity as a default.










----------------------------------------------------------
Section 3: Reel Timing and Sequencing in the Slot Template
----------------------------------------------------------


PERSON1--------------------
Can you help us customize our reel spins in [our game]? 
I looked at the api for SlotReel, but didn't see a simple way to accomplish what we're trying to do: 

1. How can we change the amount of time between each individual reel stop? 
Right now the reels all stop with a very short delay between each one, about 0.1s. 
Would we do this via the windupMotionFunctionName and make a windup function that sets different values for each reel? 
If so, could you provide an example of this?
    
2. How do we modify the behavior of the wheel bounce? 
I saw there's a "bounceMotionFunctionName" so it looks like we can make our own bounce function, but without knowing anything about the internals of the current bounce function, 
I'm not really sure what variables we do or don't have access to to control this. Could you provide an example?


PERSON2--------------------
The timing of the reel starts and stops in the Incisor Slot Template is mostly managed in the SpinReels FlowState...
you’ll see in the constructor that there are two loops that set up the timing for all of the starts and stops, 
and there is an increasing stagger set up within the loops. You can change all of the timing there.

As for the reel bounce, if you build your own bounce function using bounceMotionFunctionOwner and bounceMotionFunctionName, that takes 2 parameters: progress, and magnitude. 
Progress will just be an input number from 0 to 1 over the bounce duration property attached to the reel, and the magnitude is just the bounce magnitude property of the SlotReel itself, you can use it or not… the function takes those properties and should return a number that determines the bounce position at any point during the bounce duration (as represented by the progress parameter). 
The bounce position that function returns should be on a scale where 1 means 1 whole symbol position, so if you want it to bounce up a half a symbol’s height that function should return .5 at its peak.

The windup motion can be replaced similarly.










----------------------------------------------------------
Section 4: Font Characters Disappearing in Published Project
----------------------------------------------------------


PERSON1--------------------
Quick follow up on this, we're also seeing a very strange issue in the published version of the poker game. 
It looks like there are a bunch of font issues. 
If we just use the default "sample font", every character appears as vertical bars. 
We tried a different font, which only worked for numbers and capital letters, all lowercase letters are shown as bars. 
Any ideas on that one?


PERSON2--------------------
There are “font reduction” settings in the project settings that are likely removing all of the characters during publishing if you’re not using the project transcript for your phrases. 
You can turn it all off in the project settings.










----------------------------------------------------------
Section 5: Dragging Buttons
----------------------------------------------------------


PERSON1--------------------
Any ideas on how to get a continuous particle system to stop gracefully?


PERSON2--------------------
There’s a “stopEmitting” function on the ParticleSystem object that would do that.










----------------------------------------------------------
Section 6: Particles Disappearing when the Object is out of the Camera View
----------------------------------------------------------


PERSON1--------------------
We have a coin fountain in our game but it won't appear because its point of origin is outside the view of the camera, so the particles never start rendering. 
Is there a way to make a particle system work even if it's outside the camera view?


PERSON2--------------------
Yes, you can set the 'frustumCulling' property to false, either in code or in the GUI. If you select the ParticleSystem you'll see the frustumCulling property in the Object panel
You can turn it off there and if the ParticleSystem is in a Construct, the change will be saved.










----------------------------------------------------------
Section 7: Remote Hosting On Windows
----------------------------------------------------------


PERSON1--------------------
Does anyone know if remote hosting works on Windows with the latest release?
I want to publish and test on my phone without having to post the project online.


PERSON2--------------------
Testing on your mobile devices is very simple with Incisor.  
Go to Application Setting which can be found by clicking on the Incisor logo on the top right corner.  
Check "allowRemoteHosting."  
When you publish the project, check "enable remote hosting."  
This will create a QR code which will work with your mobile devices. 
Just make sure that you are on the same network.  
I just tested this with the latest version of Incisor with the poker project and it worked.
Also on Windows you may have to disable your firewall in order for it to work.











----------------------------------------------------------
Section 8: Inline TextBox Graphics and Rich Text
----------------------------------------------------------


PERSON1--------------------
Is there any way to show inline sprites with a text box? In [another tool we use] we could have rich text mode and indicate a sprite graphic like <sprite = "someSprite"> or something like that. And with rich text mode we could also do dynamic character sizing, bold, italic, etc.


PERSON2--------------------
Yeah to include GraphicAssets within a TextBox or TextAssembly you can look at TextBox.setSubstitutionCharacter and TextAssembly.setSubstitutionCharacter.

Also, for rich text, look at TextFormat and TextBox.setTextFormat and TextAssembly.setTextFormat. These enable you to change the font, character size, kerning, and even the material properties (including changing EffectNodes and EffectControllers) for specific portions of the text within a given TextBox or TextAssembly. 

Check out these examples for inline images in TextBoxes:
// This is the main entry point for this Incisor® project. 
// Throughout the project, this object can be referenced as 'pr'.
class ProjectMain
{
    text:TextAssembly;
    init()
    {
    // SUBSTITUTION CHARACTER APPROACH
        let alternateTextFormat = new TextFormat();
        alternateTextFormat.fontName = nc.fontNames["NotoSansMono_Condensed-Black"];
        alternateTextFormat.characterMaterial.colorMultiply.red = 0;

        let placedImageFormat = new TextFormat();
        placedImageFormat.characterMaterial.setEffectNodes([nc.effectNodes.SampleMainTexture,nc.effectNodes.ColorMultiply]);
        placedImageFormat.verticalShift = .25;

        let text = new TextBox();
        text.string = "Left*Right";
        text.setSubstitutionCharacter("*",nc.graphicAssets.SampleParticle,placedImageFormat);
         

    // LAYOUT STACK APPROACH
        
        let textBox0 = new TextBox();
        textBox0.string = "Left";
        
        let graphic = new GraphicObject(nc.graphicAssets.SampleParticle);

        let textBox1 = new TextBox();
        textBox1.string = "Right";

        let layoutStack = new LayoutStack();
        layoutStack.isVertical = false;
        layoutStack.addElements(textBox0);
        layoutStack.addElements(graphic);
        layoutStack.addElements(textBox1);
        layoutStack.position.y = -200;
        layoutStack.pivotPoint = new Vector2(0,0);

        textBox0.layoutObject.justification = "center";
        graphic.layoutObject.justification = "center";
        textBox1.layoutObject.justification = "center";
    }
}










----------------------------------------------------------
Section 9: Time ramping gameplay
----------------------------------------------------------


PERSON1--------------------
[Another popular engine] has Time.timescale which defaults to 1. Set it to 100 and the game runs 100 times faster.  
Set to .01 and, you get the idea. I see Incisor has TimePlaybackController.time() but does Incisor have a way to control the global time scale?


PERSON2--------------------
Speed controls should be able to accomplish that.


PERSON3--------------------
Looks like nc.softwareSpeed might do the trick.


PERSON4--------------------
Both are good options for certain circumstances but they work a little differently.
TimePlaybackController is not what you want - it's an API for things that play pause etc. 
It does have playbackRate, but that would just be for that thing.










----------------------------------------------------------
Section 10: Tagging Code that only Runs when in Editor Mode
----------------------------------------------------------


PERSON1--------------------
I have a question, I just thought of today. 
In [another popular engine] code it's possible do do something like #if EDITOR and have code only run if in the editor or #if !EDITOR for code that only runs when not in the editor. 
Is there something like this in Incisor?


PERSON2--------------------
Yeah, Incisor has this:

CODE.includeIf___published;
   // this only runs in the published version
CODE.includeEnd___published;
CODE.includeIf___unpublished;
   // this only runs in the un-published version (in the editor)
CODE.includeEnd___unpublished;
The “CODE” has all of the ‘pre-processor-style’ code manipulation tags on it .










----------------------------------------------------------
Section 11: Adding Constructs
----------------------------------------------------------


PERSON1--------------------
Would you mind giving me a piece of example code to make a scene containing an instance of a Construct?


PERSON2--------------------
This adds a construct to the main scene:
nc.constructDefs.[your construct name].add(nc.mainScene);










----------------------------------------------------------
Section 12: Changing the Order that FlowStateElements Happen In
----------------------------------------------------------


PERSON1--------------------
How can I change the order that my FlowStateElements happen dynamically after they have already been instantiated?


PERSON2--------------------
FlowStateElements are not reordered by manipulating an internal list, and there is no API such as FlowState.getElements() that lets you retrieve and sort them after creation. 
The sequence in which FlowStateElements run is determined solely by each element’s netTime value, which is calculated from its time value plus any variable offset values. 
To change the happening order dynamically, you modify the time values or the offset values that contribute to netTime.

Method 1: Modify the element time values directly.
To do this, you must save references to each FlowStateElement when you call addElement. Later, you can change their time property, which will automatically change their order of execution.

Example:
class MyFlowState extends FlowState {
    constructor(controller) {
        super(controller);
        this.elemA = this.addElement(0.0, "stepA");
        this.elemB = this.addElement(1.0, "stepB");
        this.elemC = this.addElement(2.0, "stepC");
    }

    stepA() {}
    stepB() {}
    stepC() {}
}

//After instantiation elsewhere:
let state = nc.flows.GameFlowController.MyFlowState;
state.elemA.time = 3.0;
state.elemB.time = 0.5;
state.elemC.time = 1.5;



This changes the order because netTime recalculates automatically.

Method 2: Use variableOffsets for more organized control.
When calling addElement, you can pass one or more variable offset names. 
These become numeric properties on the FlowState and can be changed later without touching the elements directly.

Example in constructor:
this.addElement(0.0, "stepA", [], "aOffset");
this.addElement(1.0, "stepB", [], "bOffset");
this.addElement(2.0, "stepC", [], "cOffset");

//Later:
state.aOffset = 0.5;
state.bOffset = 2.0;
state.cOffset = -1.0;

Since netTime is time plus offsets, operations like these dynamically reorder execution.

Summary:
FlowStateElement order cannot be changed by rearranging a list or calling something like getElements, because no such method exists. 
To dynamically reorder events, store references when creating them and modify their time values, or define variableOffsets and adjust them later. 
Changing netTime changes the order that FlowStateElements occur.










----------------------------------------------------------
Section 13: 9 Slice
----------------------------------------------------------


PERSON1--------------------
Does Incisor have a system for doing a 9 slice?

PERSON2--------------------
Yes. In Incisor it's called "GraphicExpander" and it's an add-on that can be activated on GraphicObjects (or anything that inherits from GraphicObject).
Other names people use for this type of feature are:
"9 Slice"
"9-Slice"
"9 Slice Patch"
"Nine Slice"
"Nine Patch"










----------------------------------------------------------
Section 14: Generating Sprite Sheets
----------------------------------------------------------


PERSON1--------------------
Does Incisor have the ability to make sprite sheets from png sequences?


PERSON2--------------------
Yes. 
First, put all of the pngs in your sequence into a directory within the project's "Assets" directory. 
Then, in the Incisor GUI, open an 'Assets' panel, find that folder, uncheck the 'inherit' button (otherwise the directories settings will just inherit the values of the containing directory), and enter a name in the 'spriteSheet' field. 
This will automatically ensure that all of the pngs in the directory are automatically included into a single sprite sheet, without any changes to any of the code that uses those image assets.
You can see the configuration of image assets within the project from within the PublishingAnalysis panel; just select 'Current Configuration', and click on the 'Graphic Summary' button to see all of the Graphics in your project - their inclusion in sprite sheets will be evident from within this menu.











----------------------------------------------------------
Section 15: SpriteAnimation
----------------------------------------------------------


PERSON1--------------------
Can I play a png sequence in Incisor?


PERSON2--------------------
Yes, just ensure that the png sequence is included somewhere in the project's Assets directory, and that the image names end in a numeric sequence that makes the ordering clear.
Next, within your project, add a GraphicObject and configure it with a SpriteSetter (either in the GUI within a Construct, or by calling 'configureSpriteSetter' on the GraphicObject).
To configure the SpriteSetter, you'll need to provide a 'keyGraphicAsset' which can be any GraphicAsset within your enumerated png sequence - Incisor will automatically find the whole png sequence.
Once the SpriteSetter is configured, the "spriteSetter" member of the GraphicObject will no longer be undefined, and instead it will be a PlaybackController object that has all of the animation playback controls needed to play the sequence as an animation.










----------------------------------------------------------
Section 16: Button Clickable Area
----------------------------------------------------------


PERSON1--------------------
When I make a button from a graphic in my project, the clickable area is restricted to the opaque portions of the image - can I change that?


PERSON2--------------------
Yes. By default, images that are included in an Incisor project have a 'trimMode' setting of 'hugged'.
This is a really cool feature that automatically decreases the download size of your project and improves the runtime performance by reducing the amount of 'overdraw' of images.
The 'hugged' setting is telling Incisor to automatically change the geometry associated with images in their associated GraphicAssets to 'hug' the outline of the non-transparent areas of the image.
This hugging is what is causing your button to be only clickable within the opaque area. 
To change this, open the 'Assets' panel and find the image file in question (the one that you used for your Button), then change the 'trimMode' setting to be 'none' or 'rectangular'.
... Save the project and reload to see the results.
Now the associated GraphicAsset will have rectangular geometry and the clickable area of that Button will be anywhere within that rectangle.











----------------------------------------------------------
Section 17: Sounds not Not Showing Up
----------------------------------------------------------


PERSON1--------------------
Good day everyone,
I have a question regarding how to properly implement the sound in my game.
So currently on tutorial it has these steps:
- We add the sound assets
- We use the nc.sounds.NameOfTheSoundFile.play()
I am trying to do it the same way it's done in the tutorial, but when I call the name of my sound file even though it's in the Assets folder it doesn't show on the list of auto-complete names. 😅


PERSON2--------------------
Did you add the sounds to the Assets directory in your project?


PERSON1--------------------
Yep. I have my 38 '.ogg' sound files in a GameSounds folder within my project Assets directory.


PERSON2--------------------
Incisor only recognizes ".wav" files for sounds. So your sounds being OGG files is causing this issue.
The reason for the WAV file requirement is that Incisor wants only completely lossless formats (wavs, pngs, etc...) so that it can handle the compression dynamically based on your desired configurations.
You can make different configurations in the ProjectSettings that have different bit rates for the sounds and you can also determine if the sounds are Mono or Stereo.
Since Incisor uses lossless formats, you can export all of these versions/configurations of the project without having to change any of the source files or code.
I hope this clears things up. Be sure to let me know if you have any other questions - thanks!











----------------------------------------------------------
Section 18: Graphic Fonts
----------------------------------------------------------


PERSON1--------------------
I've tried to make a font in my project using a folder of pngs it but I feel like I'm missing one step to define it as a font. 
When I select a font, for example, on a TextBox object, I don't have the new font as an option.


PERSON2--------------------
To ensure that a 'graphic font' is discoverable by Incisor, the individual images must all end with "_CharX", where X is the unicode decimal value of the character (this is the same thing as the ascii value for standard english characters). 
You must also ensure that you include the "_Char0" character, as that is the key character graphic that Incisor uses to detect each font. 
In other words, for every "SomeFontName_Char0.png" file that Incisor finds in your assets, it will recognize a new font by the name of "SomeFontName". 

An important note here is that the null character you supply (the _Char0 character) can just be png with a rectangle in it, and Incisor will look at that character for some basic information about the associated font such as the line height and generic character width. 
These values can be adjusted after the fact in the ProjectSettings menu too.










----------------------------------------------------------
Section 19: Changing the Browser
----------------------------------------------------------


PERSON1--------------------
When I open Incisor, the GUI opens in Edge. Is there a way to get it to work with Firefox?

PERSON2--------------------
You can change which browser Incisor uses by changing the "browserClient" value in your Incisor Application Settings. 
There is an Application Settings menu in the GUI accessible for the Incisor menu in the upper lefthand corner of the GUI.
You can also manually change the settings file directly by going the Incisor Application Support directory (users/[username]/Incisor/Red/Application Settings/ApplicationSettings.json).
You can change the 'browserClient' property to "Chrome", "msedge", or "firefox" in Windows. In OSX you can use "Google Chrome", "Safari", or "Firefox".