facecrime's Forum Posts

  • Sure.

    So for context, different types of waypoints all hold a variable that is the UID of the next waypoint to go to after reaching this one.

    And this is how I hand the stored (next) UID to the player when running into one:

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

    thx again, ramones

  • Looks like you just need a "pick all Waypoints" and then pick the Waypoints family by UID.

    Sweet! Exactly what I need, it works.

    I don't really understand why I need to pick all waypoints first, if I had the UID in the first place already?

  • well, alright. hopefully not gonna be more than a handful, bit unsatisfying though.

    thanks for your time

  • HI,

    I have a character moving between waypoints of different types, all part of the family 'waypoints'.

    Each waypoint can reference another one by UID (changes during runtime), so the character knows where to go to next.

    Right now I need to 'cast' per type to react to the different types, which feels besides the point of families, especially as the action is the same for all cases.

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

    How do I solve this more elegantly?

  • thanks for the example!

    yeah, I was thinking of that sort of approach, wiggle the enemy and hope that it solves the overlapp eventually. sadly it looks just as uncoordinated

    Is there really no way to accurately keep two moving objects from overlapping?

  • You could do it through some expression in a 'Pick' event i believe

    or

    just use the Line Of Sight behaviour, that also has a range. can even be set 360 degrees if needed

    havent got the file aruond for screenshots sry

  • I created the same kind of behaviour with a simple bullet behaviour

    • once your enemy is in circling distance of the player:
    • set the enemy's direction to look at the player and imediately add an offset of 90 degrees to that angle
    • move the enemy forward

    =>because you constantly readjust the lookAtPlayer+90DegreeOffset, the enemy will always move sidewards to the player, effectively circling the player

  • aha, could you elaborate on the "change at offset"-idea?

    I have an enemy(-family) that moves only through a bullet behaviour. they'll be moving in similar but not identical directions towards the player.

    I want them to avoid overlapping by doing a sidestepping-kinda movement while still approaching the player. I don't know how to determine the "away" direction relative to the object I'm colliding with.

  • The problem with checking collisions with the same object is that you aren't assured which Object you are getting(picking).

    See my test capx

    thanks for putting this together, seems to work nicely.

    Problem is, like you're saying, I can't be sure which object is referenced.

    What I want to use this for is to seperate two colliding objects, while not changing their overall movemn tdirection (like bounce would). this doesnt seem to work this way, as i can't make sure that I can get the correct direction, away from the 'other' object in the collision.

    Is there a better way to move overlapping objects away from one another without rotating them?

  • yeah but how do i reference the object I'm overlapping with?

    especially when the two objects are of the same type

    say i'd go

    on Event: NPC_Blue overlap with NPC_Blue

    action should be:

    Move X pixels at angle NPC_Blue.position - otherNPC_Blue.position

  • HI,

    I want my NPC move away from another NPC of the same type it's colliding with (without turning away) and for that need to get the position of that 'other' NPC. how do I best get that position on collision?

  • right, works, thank you!

  • ok, so just to be sure, we are talking about dynamically transferring objects between layouts, not copy-pasting stuff in the editor, aren't we?

    If so, perfect. Moreover: how? Please tell me how I can "grab" and transfer "global" objects to another layout

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sweet. will you make me ask how?

  • Hi,

    do I have to rebuild my HUD for every layout/level or can I transfer a layer from one layout to another?