mOOnpunk's Forum Posts

  • back up.

  • Down again.

    c'mon now guys.

  • Thought i would share my database object.

    construct.net/en/make-games/addons/1513/data-container

    I always seem to end up using invisible sprite objects to store and organise data because it's so easy to manage using Construct's picking system, but it has its issues.

    So i decided to create my own database object that emulates Construct's picking behaviour, but with more options.

    quick example

    DataContainer → Add file "Sword"

    DataContainer → Set file's "damage" to 10 for file "Sword"

    DataContainer → Set file's "rarity" to "common" for file "Sword"

    DataContainer → Pick highest "damage" → Sub-event: Text Set text to CurFileName & ": " & CurProperty("damage")

    ACEs Overview

    All ACEs are under the Container category. Here's the full list:

    Conditions (Picking, Looping, Checks, Triggers)

    File exists {0}: True if the file exists.

    Pick file {0}: Picks a specific file by name (sets as current).

    Pick file with highest {0}: Picks the file with the max value for a property.

    Pick file with lowest {0}: Picks the file with the min value for a property.

    Pick random file: Picks a random file.

    Pick weighted random file with highest {0}: Random pick weighted by property (higher = more likely; negatives/0 = equal chance).

    Pick weighted random file with lowest {0}: Random pick weighted inversely (lower/negatives = more likely).

    Pick last created file: Picks the most recently added file.

    Pick all files: Resets to select all files.

    Pick files where {0} {1} {2}: Picks files matching a property comparison (=, >, <, >=, <=, !=).

    For each file: Loops over all (or picked) files.

    For each file ordered randomly: Loops in random order.

    For each file ordered descending {0}: Loops highest-to-lowest by property.

    For each file ordered ascending {0}: Loops lowest-to-highest by property.

    For each file alphabetically ascending: Loops A-Z by filename.

    For each file alphabetically descending: Loops Z-A by filename.

    For each file weighted random highest {0}: Loops in weighted random order (higher prop first).

    For each file weighted random lowest {0}: Loops in weighted random order (lower prop first).

    On file added {0}: Triggers when a file is added.

    On file deleted {0}: Triggers when a file is deleted.

    On property changed {0} {1}: Triggers on single-file changes (or "all files" if file is empty).

    On any change: Triggers on any data modification.

    Actions (Data Manipulation)

    Add file {0}: Adds a new empty file.

    Add property {0}: Adds a property (with null value) to all files.

    Set file's {1} to {2} for file {0}: Sets a property in a specific file (creates if missing).

    Set all files' {0} to {1}: Sets a property across all files (creates if missing; triggers "all" change event).

    Delete file {0}: Removes a file.

    Delete property {0}: Removes a property from all files.

    Clear all: Wipes all files and properties.

    Load from JSON {0}: Replaces data with parsed JSON string.

    Download to JSON file {0}: Downloads current data as a .json file.

    Expressions (Data Access)

    CountFiles: Number of files.

    CurFileName: Name of the current file (in loops/picks).

    CurProperty({0}): Value of a property on the current file ("" if missing).

    FileProperty({0}, {1}): Value of a property on a specific file ("" if missing).

    AsJSON: Entire container as a JSON string.

    Tagged:

  • construct opens for me but wont let me create a new project.

  • I do a lot of simulation stuff.

    I made myself a fuzzy logic plugin but found it was too hard to calibrate, so i took it a step further and turned it into an adaptive neuro-fuzzy inference system.

    It's fuzzy logic but the difference is you set a number of steps, it then runs the fuzzy data set, then it takes the results and feeds them back into the fuzzy sets on the next step to auto tune or calibrate itself.

    It worked but the plugin was never finished to a releasable state.

    EDIT> just reread the original post, this probably is not relevant to what you need.

  • I see what you mean, but to be fair it literally and clearly explains it at the top.

  • So people pay you to make the plugins, then they have to subscribe to your service to use them?

  • Try pressing f12 when the message pops up, the console may have logged the error.

  • I guess you have to let the bots on the site if you want ai to be knowledgeable about construct. At the moment their knowledge is still very hit and miss.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • chatGTP bot probably someone asked chat gtp a question about construct and its looking for the answer.

  • // SDK v1

    let myinstance = this._inst.GetWorldInfo();

    myinstance.SetXY(x, y);

    // SDK v2

    // Access the position property directly or use the methods provided

    this.x = x;

    this.y = y;

    this.setBboxChanged();

    This returns a runtime error, function not found.

  • what is the correct way to update the bounding box in sdk v2?

    At runtime.

    i use a red rectangle to compute the bounds and need the bounding box to get its shape and position from it, but it wont update.

    Thanks.

  • Thanks i will take another look.

  • Thanks.

    I tried console.log(this)...

    instance.js:127 [Polygon] DrawingInstance: this: DrawingInstance bounds: {minX: -50, maxX: 50, minY: -50, maxY: 50, width: 100, …} collisionMode: "0" moved: (6) [408, 119, 458, 219, 358, 219] points: (6) [0, -50, 50, 50, -50, 50] rotatedBounds: {minX: 0, maxX: 0, minY: 0, maxY: 0, width: 0, …} updateBbox: true #t: C3.WorldInfo _x: 408 _y: 169 _w: 100 _h: 100 _ox: 0.5 _oy: 0.5 _boundingBox: C3.Rect {_left: 358, _top: 119, _right: 458, _bottom: 219} _inst: C3.Instance runtime: self.IRuntime [[Prototype]]: self.ISDKWorldInstanceBase

    The #t: C3.WorldInfo object exists, but the instance isn’t linked to it via GetWorldInfo().

    The plugin executes

    plugin.js:1 [Polygon] plugin.js: Loading plugin.js type.js:1 [Polygon] type.js: Loading type.js instance.js:1 [Polygon] instance.js: Loading instance.js conditions.js:1 [Polygon] conditions.js: Loading conditions.js main.js:1 [Polygon] main.js: Loading main.js main.js:17 [Polygon] main.js: All plugin scripts imported.

    globalThis.SDK is undefined, but globalThis.ISDKPluginBase, globalThis.ISDKObjectTypeBase, and globalThis.ISDKWorldInstanceBase are available.

    main.js:4 [Polygon] main.js: SDK namespace: undefined plugin.js:5 [Polygon] plugin.js: SDK namespace: undefined plugin.js:6 [Polygon] plugin.js: ISDKPluginBase available: true type.js:5 [Polygon] type.js: SDK namespace: undefined type.js:6 [Polygon] type.js: ISDKObjectTypeBase available: true

    DrawingInstance lacks the GetWorldInfo() method required for IWorldInstance.

    instance.js:126 [Polygon] DrawingInstance: Constructor called instance.js:127 [Polygon] DrawingInstance: this: DrawingInstance instance.js:130 [Polygon] DrawingInstance: GetWorldInfo exists: false instance.js:134 [Polygon] DrawingInstance: this properties: ["runtime", "objectType", "plugin", "effects"] instance.js:145 [Polygon] DrawingInstance: Could not assign GetWorldInfo, C3.Instance lacks method instance.js:174 [Polygon] DrawingInstance: WorldInfo after init: undefined instance.js:176 [Polygon] DrawingInstance: GetWorldInfo missing after init, instance may not be fully registered as IWorldInstance

    Overlapping fails

    conditions.js:23 [Polygon] IsOverlapping: this.GetWorldInfo() failed, this: DrawingInstance

    Ashley any guidance?

  • I'm stuck until this is resolved. Shame i think a lot of people would have liked this plugin.