facecrime's Forum Posts

  • I'm seeing that each object type only appears once in the array but there are multiple instances of each type.

    So that points toward what you said, somewhat although I'm not sure I get it:

    To specifiy a little, I have triggers that look up their connected spawn points (SPs hold UID of connected trigger).

    The spawn points then spawn the actual enemy, the enemy registers to that array and the spawn point is destroyed.

    All in a single event:

    Event - On touch of trigger:

    Subevent - Pick SP by comparing SPvar to triggerUID

    Action - spawn enemy (of type of SP)

    Action - register enemy UID to array

    Action - destroy SP

    Trigger and array share a container so AFAIK no picking is required

    Now i see that I'm not specifically picking the instance of the enemy i just created, but should that be necessary, when it's the succeeding action within the same event anyway?

  • Hi everyone,

    I'm having object instances push their UID to an array upon spawning (muitiple within a single cycle). But I sem to be getting irregular results, with only two of the instances making it into the array.

    Any idea why that might happen, is there some limitation to the number of pushes or some overwriting issue when doing multiple pushes in a single cycle?

  • Addendum: Problem is, if I move them by mouse dragging, all the silightly offset/rotated objects will not snap into their original relative positions, but instead leave gaps to previsously adjacent objects.

    This could be avoided that by moving the selection numerically, is there a way?

  • Hi everyone,

    basic editor question: I want to move all the content of my map when I resize the map.

    I want it all to adhere to the grid, but some objects are off the grid due to rotation.

    So what i would like is to do a select-all and move the whole thing by a set number of units. Any way for that in C2?

    Alternativley, is there a way to control which side of the map is extended?

  • Sup with that? Thanks for your reply.

    So I'd set all sprites of the current enemy's height level to low cost and all others to high, right? An idea if that would be applicable per enemy instance, each having their own cost situation? Guessing thats probably all in the obstacle map too and hence not instanciatable either, no?

    Just thinking out loud, all it would take is a gap in walkable cells between two sprites of different height. A staircase sprite could bridge that gap. Is there a way to edit or manipulate the walkalble cells other than through solid objects?

  • Hi everyone,

    I'm wondering if anyone is aware of a way to fake height differences for a top down game? The catch is that the pathfinding behavior needs to be able to navigate it.

    So far I've been toying around with assigning a height variable to sprites and if my player would hold the same value in an internal variable the sprite would be permissive else it would be set to solid. Worked ok for only the player.

    Now if I applied it to enemies the pathfinding would need to be able to predict what sprites make you transit from one level to anothe, what order is required and all of that.

    Is anyone aware of good concepts for this topic?

  • good call, randomly, I looked into that and by all means that should have done the trick, if the problem was really in the usage of the behaviour.

    but after removing the bullet i still get the same issue, so the issue seems to be elsewhere. odd thing is that i have two states using pathfinding and only one keeps having trouble.

    it seems that the troubled state won't trigger the 'on path found' event won't fire, even though the set destination is valid, debug says it has a path, but won't set a speed.

    any ideas perhaps?

  • It's necessary to switch between both when I need frequent updates of the target position vs when I need 'complex' paths to be resolved.

    Think of the zombie-type behaviour in a top down shooting scenario:

    When my enemies are spawned they need to figure a way around various obstacles to get in attack range of the player.

    This is resolved by pathfinding, but can only be updated every couple of ticks.

    When my enemies are close to the player (and have LoS) they use bullet to properly follow the player who is constantly moving.

    In most cases there will be no major obstacles in their way - if LoS were to be broken I switch back to pathfinding.

    Just check my old arcade example, it illustrates the situation perfectly:

    https://www.scirra.com/arcade/action-ga ... 10787?cp=5

    the first enemy you encounter has the issue where he won't move when he's supposed to 'circle' the player (see debug info)

    the following few enemies swarm you zombie-like, they apply both behaviours (see debug) and it works pretty nicely.

  • Hi everyone,

    I'm using bullet and pathfinding behaviour on the same objects and they seem to be conflicting on some occasions.

    For sake of a higher update frequency certain states of my enemies can switch from pathfinding movement to bullet movement.

    Other states however use only pathfinding and ironically those don't move anymore since I introduced the alternative bullet movement to the above part.

    I made sure to disable the bullet when not needed but the pathfinding-only state still won't move when it should. Could disabling the bullet block some aspects of the pathfinding?

  • Possible. Damn. Thanks for clarifying

  • Hm, sucks to hear. But older links to that same box still appear to work!

  • Hi everyone,

    when exporting my project as an html website and starting it from my dropbox it suddenly won't start anymore, but the browser asks to download the index file instead of launching the game.

    What's going on here, can anyone tell?

    I did fiddle with project settings lately, mostly playing with view port sizes and resolution, but nothing that I would expect to casuse this.

  • Oh wow, this is most impressive! Haven't played yet, certainly will, but some questions off the bat:

    did you build this all on your own or with a team? How long did it take and did you work on it full-time?

    I'm guessing you have a history with professional animation or art at least?

    Congrats on pulling this off, really great achievement!

  • 99Instances2Go you know, adding obstacles for Los- and pathfinding behaviors.

    Now that you address it ... I add those to the Enemies family OnCreate of each enemy instance. Is that even necessary or should it be enough when instancing that family for the first time only?

    the whole thing goes through a number of steps, trying to catch all that matters:

    spawning all enemies whose locator is tagged to the current trigger, setting a few vars, disabling the trigger after that.

    tried 'pick by evaluate' instead of loop too, no difference.

    setting obstacles and targets for behaviors onCreate of instance

    also setting an inital distance to player - later updating every 0.1 second

    could this be expensive?

    the initial starting point of the enemy state machine

    (not doing very much anymore at this point tbh)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yes and that's what's odd, cause it also stutters when i spawn a single guy. proper freeze on the whole app.

    check here - earliest occurence is when that first drop pod creats the single enemy:

    https://www.scirra.com/arcade/action-ga ... 10787?cp=3

    I had that suspicion of unnecessary embedded loops as well and I'm somewhat confident that i earsed all likeliness for that by now.

    Could the container spawning the bases for my turrets be a performance strain?