Magistross's Forum Posts

  • Not sure if the await keyword is exactly what you want. Could you perhaps illustrate a bit more how you intend to use said function ?

  • You can compare every tick the cycle position, if the current value is less than the value of the last tick, it means a cycle was completed.

  • As a side note, since you are destroying most "walls" sprites as soon as they are created, creating them conditionally instead would speed up things tremendously.

    Also, you create ViewportWidth * ViewportPortHeight + 10 objects, and yet you place them quite beyond the limit of the viewport, I'm not sure if this is intended. Are you trying to tentatively create an object every 10 pixels inside the viewport ?

  • You have to re-seed the plugin if you want to generate a new set of noise values.

    The easiest way is to update the seed with AdvancedRandom.RandomSeed on each call to GenerateWalls.

  • I don't think the scripting API offers anything to do that directly, however you could probably create an event sheet function that deactivate/activate a group name received in a parameter, and then call that function using scripting with the runtime function callFunction(name, ...params).

  • It shouldn't trigger only for the last instance. I'm curious to see your implementation if you can reproduce your observed behavior in a simple c3p file.

  • Pick all is actually used to reset the "selected object list" (SOL) when it is currently filtered and you wish to select through all instances again.

    For each is used when you want to do things relative to a single instance at a time.

    Both of which is not what you are after.

    Selecting the text1 instances where var = 1 is as simple as that :

  • dt is the measure of time (in seconds) that elapsed since the last tick.

    Let's say you add dt to the x position of a sprite each tick, it will effectively move one pixel to the right every second.

    If you want to "mimick" an "every tick" synced at 60fps, you could then add dt*60 to the position, so the sprite would move 60 pixels to the right every second, independently of the current refresh rate.

  • Move the line

    	globalThis.statusTextInstance = runtime.objects.txtOutput.getFirstInstance();
    

    to the ePrinter event sheet. Either before the other line in the "Start of layout" trigger, or simply use the "On created" trigger of the text object.

  • Problem is when you start from the "Start" layout, the text instance doesn't exist yet, so "getFirstInstance()" returns null. When you try to use your global variable "statusTextInstance", it then fails from a null reference error.

    What you could do is simply set the global during the start of the "Print" layout, or using the "on created" trigger of the text instance.

  • Eren basically took under his belt the maintenance of this addon with his fantastic C3 runtime conversion. Let's see if he's still active to adapt it to the new module mode for external scripts.

  • Might be simpler to just check the "PickedCount" expression under the overlapping condition.

    + Circle: Is overlapping Square

    + System: Square.PickedCount >= 2

    -> (Do something)

  • I feel like we exchanged mails recently. Haha !

    What dop2000 means is that you usually preload all JSON data on the loader layout, storing it in either variables, global dictionary and such to be parsed later, or you can also load the data directly in its corresponding object.

    However, knowing what your use is, you will probably have to end up storing the JSON as text, and parse it on demand depending on what files (dialogues) you currently need.

  • I recommend using a dummy layout where you place a single instance of every object. That layout will never be used in runtime, but you can use it in the editor to edit default values of instance variables for example.

    I find that Construct usually dislikes and/or behave strangely when using objects that have 0 instance at edit time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can also use Mouse.AbsoluteX and Mouse.AbsoluteY to get coordinates relative to the game window (or canvas) and not the layout.