-
Notifications
You must be signed in to change notification settings - Fork 0
new
Grisgram edited this page Sep 15, 2025
·
1 revision
With this command, you can create instances of struct classes (i.e. call constructor functions).
new("TypeName", <constructor_args>)You see, calling a constructor in scriptor looks more than calling a function named new and not a normal constructor. This is due to the language design of scriptor. It handles a constructor call internally equally to a function call.
You supply the name of the class to instantiate as first argument followed by constructor arguments that shall be forwarded to the constructor.
- Change the room through a
Transition
var trans = new("FadeTransition", "rmEntrance", 1, 1)
ROOMCONTROLLER.transit(trans)or shorter as one-liner
ROOMCONTROLLER.transit(new("FadeTransition", "rmEntrance", 1, 1))- Use Utilities, like the Coords
var c2 = new("Coord2")
c2.x = 100
c2.y = 100Back to Repo ● Wiki Home
Copyright © coldrock.games
- Home
- Scriptor Contents
- Scriptor Configuration
- Notepad⁺⁺ Integration
- Create a Script
- $ Variables
- Call a GML Function
- Scriptor global functions
- #-Commands
- The Scriptor Broker
- Broker Events
- Self-Registering Scripts
- Registering Broker Events
- Scriptor Broker File Format
- Extending Scriptor
- var
- new
- goto
- gosub and return
- return (without gosub)
- call
- reset
- Loops
- Conditionals