lukaszkups's Forum Posts

  • 6 posts
  • Can I suggest also my platformer to the list?

    Terry Poorflyer, available on steam for some time already: store.steampowered.com/app/1935130/Terry_Poorflyer

  • I have following code after I spawn a bullet:

    const angleDict = { "up": -90, "left": 180, "right": 0, "down": 90 };
    const player = runtime.objects.PlayerFamily.getFirstInstance();
    console.log(player);
    const playerAngle = player.instVars["direction"] || "up";
    const bulletAngle = angleDict[playerAngle] || 0;
    const bullets = runtime.objects.Bullet1.getAllInstances();
    const bullet = bullets[bullets.length - 1];
    // bullet.angle = bulletAngle;
    bullet.behaviors.Bullet.angleOfMotion = bulletAngle;
    console.log(player, playerAngle, bulletAngle, bullets, bullet);
    

    And player has a 4-directional behavior, which toggle its `direction` variable.

    Everything goes well for `left` and `right` direction (bullets flies in right direction) but fails for `up` and `down` - even though console logs proper angles etc. it keeps flying only left or right - can someone help?

  • Ok nevermind my question - turned out that all I need to do is to pass an array [R, G, B] as a new value for this filter. T___T

  • You can use native JavaScript methods to work with regular expressions:

    https://www.w3schools.com/js/js_regexp.asp

    Same probably goes for color conversion and other common C3 functions.

    Thank for your reply, but I've meant rgbEX not regex! ^_^ It's about color object :)

    I need it for using `BetterOutline` filter (https://www.construct.net/en/make-games/addons/449/better-outline) as I want to set its value programmatically via JavaScript and it cannot take a string as a value (getting Type mismatch error)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, I would like to use rgbEx (mentioned here: construct.net/en/make-games/manuals/construct-3/tips-and-guides/the-c3-runtime) in my JavaScript scripting in Construct 3 project, but I cannot find it anywhere (tried `globalThis`, `runtime` etc. but without success - I cannot find the reference to this method - any tips?)

  • On my recording available here: https://twitter.com/i/status/1377196918254796803 you can see that I'm rotating the crosshair sprite as player moves (thanks to `Orbit` behavior), here's the screenshot of that logic:

    I would like to achieve an effect when crosshair moves smoothly from its current position to its destination (e.g. by 0.5 second) - is it easily achievable?

  • 6 posts