WackyToaster's Recent Forum Activity

  • Glad to find another thing that will introduce a breaking change to a plugin if fixed :^)

  • Doublepost because I can. This decelerates the way I want to (and expect it to tbh) and I have the deceleration of the behavior itself set to 0. So at least there's an easy workaround. But I still wonder if the other behavior is expected, maybe it is, it's the 8 direction behavior, not the 360 degrees smooth movement behavior.

  • I have a sprite I intend to move via the 8direction behavior. I'd like to accelerate that sprite at a given angle for (enemy) movement (e.g. at a 10 degree angle)

    Doesn't work properly, the sprite does not move at a 10 degree angle, instead it goes straight ahead.

    I have another sprite that I wanna impact by an explosion. The explosion also accelerates the sprite at a 10 degree angle (e.g. based on the position to whatever exploded).

    Doesn't work as I'd expect, the sprite only briefly moves in the correct direction, then moves straight ahead instead of at the 10 degree angle.

    It's pretty obvious to me that this happens because the deceleration is applied horizontally and vertically, and not in the opposite direction of the velocity. But I do wonder if this is correct and intended. In any case, it's quite annoying and I have yet to figure out the formula to manually decelerate them the way I want to.

    c3p if you wanna check it out

    wackytoaster.at/parachute/8dirproblem.c3p

  • That looks dope!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've had similar issues but that was even before the recent update. Sometimes the new image points just aren't saved properly but I also cannot reliably reproduce it. It just randomly doesn't work.

  • What exactly are you struggling with? There's an example project right there on the website and the plugin is very simple.

    sdk.poki.com/construct3.html

    sdk.poki.com/downloads/pokiSDK.c3p

  • I think right now the ideal approach to working with AI is to simply also be capable yourself and just use it as a supplementary tool. If you just mindlessly copy the code it spews out you're not gonna get far, and you learn nothing from it. I don't need AI to produce code for me that works perfectly with constructs API. I can just get a basic idea of the logic that I need and adapt it to the API myself or translate it into what the code would look like with events (Constructs events are quite close to javascript in the end).

  • > Detect "holes" in the floor with a raycast.

    > wackytoaster.at/parachute/enemyturnaround.c3p

    Construct 2 doesn't have these Line of Sight parameters. :(

    Do you know what the alternative would be in C2 to replace them?

    You can sort of replace raycasts with sprites and just check "is overlapping ground"

  • Detect "holes" in the floor with a raycast.

    wackytoaster.at/parachute/enemyturnaround.c3p

  • It's useful for general scripting questions, but Construct-specific stuff it gets wrong.

  • Well yeah, like that you have direct access to the class without having to import, but I'd say it's kind of dirty to program it like that hehe. At least to me it makes sense to have it organized that way. Just as an example:

    import * as Player from "./player.js";
    

    Now I have the Player Module, which can include more than just the player itself. It could also contain, say, the camera and the player weapon, which kind of make sense to be part of the player Module. Like so:

    runtime.objects.player.setInstanceClass(Player.Player);
    runtime.objects.camera.setInstanceClass(Player.Camera);
    runtime.objects.sword.setInstanceClass(Player.Sword);
    

    So everything regarding the player will be inside one separate file. And the setInstanceClass can happen only in one file in one place. So if something goes wrong or I have to add another instance class, I know exactly where to look.

    I write plenty of dirty code btw. but I still try to keep it minimal and do regular cleanups. There's nothing wrong with dirty code to a degree. Be more like Balatro-dev and less like Yandere-dev. Both have "dirty" code but Balatro is printing infinite money and yandere simulator still isn't finished (it's been 11 years)

  • You need to export the class and

    runtime.objects.plr.setInstanceClass(plr.plr);
    

    the first plr is the module, the second plr is the class.

WackyToaster's avatar

WackyToaster

Member since 18 Feb, 2014

Twitter
WackyToaster has 26 followers

Connect with WackyToaster

Blogs