CloveltOc's Forum Posts

  • Maybe using bullet would do the trick?

    compare two values - distance(player.x,player.y,enemy.x,enemy.y)

    if not agro-----------------greater than X

    -------------then

    -------------set enemy "agro" true

    isn't agro

    -----every X seconds

    -----set bullet speed to X

    -----set bullet angle to random (360)

    is agro

    -----move towards angle -

    -----angle (self.x, self.y, player.x, player.y)

    -----X pixels

  • Got a shooting system working, uses 13 parameters so I wrapped it up with a function instead of using another dozen of instance variables (do not know if this is a good idea). Works if it is given numbers, but it does not if given function.param(number). I've read both entries in the manual and looked around, but I cannot figure it out.

    I'd appreciate any help!

    Capx: https://www.dropbox.com/s/jp6a7sn0w37bu ... .capx?dl=1

  • Thanks for the demo, ! I do feel relieved now, editing the title to solved.

  • Yup, I checked and there's not much of a difference using "for each" or not, as I said I'm more worried about the quantity of instance booleans affecting performance. There will be many ships running at the same time, without having in mind AI, etc. That's why I'm making this post. Still looking for the answer, though.

  • Thanks for the response, ! But I had previously invested some time and tried the same alternatives, which aren't working for me (at least in my case).

    First, using "every X seconds" with "for each" will only trigger the event on the first instance of the family (the picture is actually wrong, it's a family), as it is said in this post. The solution I currently use came from this post, which doesn't even use families, but has a similar structure.

    Second, using the "every X seconds" will not even work as intended, because then the player would be able to skip cooldown time and shoot twice, which would be way too op for long cooldown weapons. Let me explain:

    -Blaster (5 second cooldown)

    ·Wait 4.9 seconds

    ·When fire is pressed twice 0 and 0.2 seconds later, it will have skipped 99% of it's cooldown time on the second shot.

    Third, this is the exact reason why I was looking for a better solution, but it seems like it is timer or nothing...

    But again, thanks a lot for the response!

  • Not trying to be picky, but using a boolean per each of these is quite annoying. I know it can be done with the Timer behaviour, but I just can't figure it out.

    Is it even worth it? Does having a huge number of booleans/variables on an object with many instances affect performance? Would love some insight about this, since I've been looking through the forum and found no real solution, just ideas.

    Thanks in advance!

  • Nevermind! fixed it. Had an "else" that wasn't affected by the "for each". Can't figure out how to edit the post title to <solved>, so I'll probably delete it later overall. Thanks, SoldjahBoy though!

    Edit: You apparently cannot delete topics either?

    Edit2: Figured out how to edit topic titles

  • Sorry! Litetween is quite a common plugin though... (reuploaded)

  • Reuploaded

  • I don't think so though, I've played lots of local multiplayer games on this machine and they worked perfectly! Still, the second issue made me suspect that this problem wasn't the hardwares' fault.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I made a system for input in my actual project, but I think I still have some misunderstandings with families because it isn't working as intended, and seems risky to leave it as it is.

    Binded controls for several players (only 2p set atm) are stored on an array, then there are a lot of "on keycode pressed" that call the corresponding function when said buttons are pressed. That function simply sets the corresponding instance of a family to true/false.

    The booleans are being set correctly, but the "is X input boolean" events doesn't seem to be doing what they should. That is, when lots of keys for different players are pressed at the same time, sometimes one does not do anything at all. I thought it would be fixed adding a "for each <familyName>", but nope! If you look closely, when pressing Up arrow (player 2) and W (player 1) at the same time, only one of those spawn three particles.

    I would greatly appreciate any help. If you see that I did something stupid like placing an useless loop, or a way simpler way to achieve this system, I would love to hear it!

    If you don't understand something in the .capx, please reply and I will explain it further. I just want to end this family nightmare!

    Capx (click on keys and press another to bind it): https://www.dropbox.com/sh/a397h7mbwj3k ... gTDra?dl=0

  • Hey , because Somebody isn't around anyore I was wondering if anyone could update the "trim" effect to support negative values, it would be really, really useful! And it's not a big change at all in my opinion, yet it is vital for the main mechanic of a big project!

    0 < 100%: Trims right to left

    -100% < 0%: Trims left to right

    Thanks in advance

  • Hey Somebody, I know you haven't posted for a while but I was wondering if you would someday update the "trim" effect to support negative values, it would be really, really useful!

    0 < 100%: Trims right to left

    -100% < 0%: Trims left to right

  • I was looking for a solution to blending TiledBgs to their correspondent rectangular sprites (linked through a container).

    I know it looks confusing, but imagine it being a rotated, looping, masked TiledBg blended over a sprite.

    Is it more clear now?

    Thanks for checking this out, tho

  • Hey, so I've been having this problem lately.

    I wanted to make a simple area system, in which the player would be able to get different effects when overlapping them. The addresed issue, however, is more about how it looks, rather than how it behaves.

    Areas are simple sprites (what the player actually collides with)

    I wanted to put a simple animation on them, so I added a rotated Tiled Bg with a tiny texture as a container that would stick to them and loop horizontaly, blended with source in blend mode and triangular sine movement.

    However, if they are too close to each other, they blend with other areas too, any ideas on how to approach this?

    Capx:

    https://www.dropbox.com/s/ixttos6qt3pi6 ... .capx?dl=0