facecrime's Forum Posts

  • *bump*

    does that mean it's not possible to receive specific overlap positions in C2?

  • Hi,

    can I detect the point that two sprites are overlapping at?

  • yes, pretty much. although I'd should not need to be that exact same one I switch to, Just switching to some other image, presumably refrenced through another sprite object. say my player sprite collides with some npc sprite, upon which he takes on a different image. that different image I'd like to be able to reference differently than by switching to a different preassigned animation, I'm guessing that there might by a way to reference the image of another sprite somehow..?

  • that seems like an easy solution, thanks. however ideally I'd like to ben able to apply external sprites, like say the same sprite I'm colliding with, referencing that same image file. Is there a way to do that, referencing another sprite to switch to?

  • Hi,

    I want to exchange my sprite's image based on events. I want to avoid destroying my sprite object and spawning a different one in order to not lose its behaviors and variables. Is there functionality for this or do I need a different approach?

  • Hi,

    trying to set up an FSM, not a proper coder myself, but shouldn't this work? I'm getting somewhat unpredictable results, like entities not moving or not stopping, some times firing, sometimes not.

  • the expression is of course a good idea, not really aware of all the methods C2 provides there.

    now i'm trying to sort this in a wanna-be state machine, but somehow I still can't get my enemy to stop in range.

    [attachment=0:1bneadhf][/attachment:1bneadhf]

    why is the pathfinding behaviour not stoppable by either 'stop' nor 'disabeling' the behaviour?

  • Hi,

    I'm using a turret behaviour on my enemies to have them detect the player, turn to him and (on Turret shoot) resolve a path towards him.

    Now I want them to stop at a certain distance from the player. So far I've been using a second turret behaviour, but this has a lot of side effects that I need to fix and is not ideal.

    The easiest way I figure is using a dedicated collision check to fake a distance check in order to disable the approach behaviour. But I don't see an elegant way of assigning each enemy a sprite of type-depedant sizes, other than a seperate loop to place a radius sprite on each enemy each tick.

    Any suggestions how best to go about a radius check per enemy?

  • R0J0hound that's amazing, thanks a lot! and way more than I was hoping to find.

    It behaves exactly like I need it to and is a really elegant solution at that.

    I do get how you position them according to their slot in the column and I didn't know about 'move at angle' which is pretty sweet.

    I'm still struggling to wrap my head around how you determine and assign the columns though. maybe you have a(nother) second to help me understand:

    what does which loop do?

    you're giving each follower its column, depending on whether its count is higher than the current column?

    and you count the columns in n? but you're rewriting it in the second loop, no?

    anyway, thanks for your time and for providing a full solution, very much appreciated!

  • Hi,

    this one's a bit ambitious and I'm not asking for anyone to take me all the way, but I'd be thankful for any pointer that is more than a wiki link

    So I want a squad to take on a formation around a leader.

    Problem 1: I want the formation to rotate along the rotation of the leader

    Problem 2: I want the formation to scale per number of units (see schematic)

    (I'm only concerned with generating the positions, movement to these positions is solved with C2's pathfinding)

    Green be the leader, blue be the squad units. Squad can vary in size (number of units).

    [attachment=0:1xmicg0s][/attachment:1xmicg0s]

  • good call, thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've been trying these things, among others, but the results are variations of what I described:

    when holding the 'spawn' button it flickers, being set on and off

    [attachment=0:ausynbv6][/attachment:ausynbv6]

    when releasing the 'nuke' it immediately resets

    [attachment=1:ausynbv6][/attachment:ausynbv6]

    my real problem i believe is that all the 'On Touch ...' events trigger every cycle during mouse-clicking. which i find mildly disturbing.

    Can I disable touch input when not on a touch device?

    Is there a way to not register onTouch multiple times?

  • looks like a big part of the problem is that I'm simultaneously providing touch and mouse controls, and while mouse alone can be set to work fine, my touch input seems to constantly trigger as well, despite not being on a touch device ...

  • Hi,

    I want to have a button that changes a text variable based on its own state. Per default the variable is 0, button 1 sets the it to 1, button 2 sets value 2. Pressing a button the second time should reset the variable back to zero.

    So I have two' System'>'Compare value' events to toggle the state, but they seem to overwrite one another in the same cylce, effectively setting and resetting the value in a single cycle.

    Can someone point me to a working example of a two button setup that toggle a single variable?

    Here's what mine looks like:

  • At that point I was using Turret behaviours, as it that also gave me some rotation to work from.

    but yes, I've been splitting those processes now and I am actually using sprite collision detection which does help visualise my triggers.

    But I am now using these triggers to spawn enemies in another position, which I define thorugh another object that I reference by UID. As I have quite a few triggers and spawnpoint locators on my layout now, I'd like to see what trigger is connected to what spawnpoint. Any ideas how to visualize this connection in the editor?