Rhindon's Recent Forum Activity

  • vee41 - Thank you, sir! :) And, "automagically"? *grins* You've been hanging around Yann, haven't you? heh heh

  • On a similar note:

    When I create an instance...

    For Each Node | Create Object Ping

    ...do any sub-events pick that instance of Ping for the duration of that interation of the For event?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Excellent. That's what I thought.

    So then, moving more specifically towards my game...

    I have a series of object instances ("Ping") that are created at the image points of the instances of object "Node". Each Ping instance has an OriginIID instance variable and is given the IID of the Node at which it was created. Each Ping is then extended in width until they either...

    1. overlap a wall (action: Destroy) or

    2. overlap another instance of Node (action: store the IID of Node to OriginIID).

    Thus...

    0. Every Node instance has an Array contained with it.

    1. Node(0) creates x instances of Ping.

    2. Ping(x) extends in a compass fashion...up to four directions.

    3. When Ping(x) overlaps with Node(1), the Array that is contained with Node(0) will receive (via Push) the IID (stored in OriginaIID instance variable) of Node(1).

    This way, when the Enemy overlaps Node(0), it will be able to pick from the available directions that it can go...in this case, whichever direction Node(1) lies. Since the IID of Node(1) is contained in the Array of Node(0), I can easily plot a path for it via Pathfinding.

    But...I'm hitting snags and I'm trying to refine/eliminate the causes to why it's not working.

  • pixel perfick - The overlap event is generally irrelevant in question 2...I just needed to make sure that picking one will pick the other if they're both in a container. That way I'm avoiding needless extra instructions.

  • How exactly are you instructing it to jump? Depending on your set-up, you might just need to reverse the instructions for the downward fall, since the 8Directional behavior doesn't have a gravity element built into it.

  • Before I get into another LONG-winded explanation of what I'm trying to do in an area of my game, I just need to (re?)confirm a couple of things about overlapping and containers.

    1. When Object1 overlaps an instance of Object2, does that instance of Object2 automatically get Picked?

    2. If Object3 is in a container with Object2, when Object2 is overlapped, does Object3 also get picked simultaneously?

    Thanks!

  • ramones - Yeah, ArcadEd helped me figure that out earlier today. *facepalm to the max* I THOUGHT I checked for that very thing but totally overlooked it anyway. Thank you for confirming it. :)

  • I haven't gotten the While loop mastered, myself. It is rather tricky to understand.

    Can you detail a bit more what you're trying to do?

    Also, you might want to look into the Stop loop action to break out of the loop, otherwise it will continue and lock up the game as you've noticed.

  • *bump* ...this got pushed to page four REAL fast...

  • .CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6734583

    UPDATE: Thanks to ArcadEd for helping me discover that the problem was in my debug...not my actual Events/Actions.

    In the .capx file, you'll notice in the "LO LVL 1" layout that there are two red dots (object NodePatrol) and seven black dots (object NodeDirection). There is an array dubbed NodeCompass which has a X-length of 4.

    I'm working on setting up an enemy patrol system that can be adapted to any level, regardless of how many of each type of Node objects there are. The NodePatrol objects denote intersections, while the NodeDirection objects identify available directions to choose from. This way, regardless of the level, I only need to place the nodes wherever I please and all that's left is to set up the instructions on how to choose which route to take next when the enemy reaches a NodePatrol object instance.

    Here's my problem...

    I'll try to break it down clearly.

    Look up line three of the "ES CharEnemy" Event sheet.

    Using the For loop for a duration of 0 to NodeDirection.Count-1 (the -1 because the loop starts at zero and because the loopindex expression will be of use next), pick each instance of NodeDirection according to the loopindex value. Per each instance, check if it's overlapping any instance of the NodePatrol object (presumably, this will simultaneously pick that instance of NodePatrol, as well).

    Because the NodeCompass array is part of the container with the NodePatrol object, this should also pick the array instance associated with the NodePatrol instance. The following action should push the IID of the current NodeDirection instance (again, based on the loopindex value) into the array contained with the NodePatrol instance being overlapped.

    Here's where the problem creeps in...

    You'll notice on the layout that I have two NodePatrol instances and seven NodeDirection instances. I have debug text objects to highlight the IIDs of each NodeDirection instance, 0 through 6. The "A | A | A | A" text are the values in each instance of the NodeCompass array ("A" serves as a place holder so not to be confused with instance 0 or just simply having no other value).

    What seems to be happening is that, as each instance of NodeDirection is checked, the switching between interrupts the process. You'll notice that one instance of NodePatrol has instances 0, 1, and 3 of NodeDirection next to it. The other instance has IIDs 2, 4, 5, and 6. However, when you look at each text display showing the IIDs stored into the related array, instances 3 and 6 (the last of each group of NodeDirection instances surrounding each NodePatrol) are not stored in the array. Only 5 of the 7 IIDs are accounted for. This is what leads me to believe that there is a hic-up in the process. I've even tried using Pick nearest NodePatrol but that doesn't help any.

  • .CAPX: https://www.sugarsync.com/pf/D6025908_4317202_6734583

    FYI: I am using the latest beta.

    Yes, friends! It's me...you're highly complicated, verbose, confused game developer.

    This time around, I'm working on setting up a patrol system for my enemies. When they aren't chasing the player around, they're "walking" between "patrol nodes" at intersections on the map. For each patrol node, I have 1 to 4 instances of directional nodes. These will be randomly (for the time being) selected to determine which direction the enemy will patrol next...always towards another patrol node.

    What I need to do is test for each directional node that it is overlapping/touching the patrol node. Every directional node will overlap a patrol node, so it's a matter of WHICH one. To solve that problem, every patrol node has an instance of an array contained with it.

    When it is detected that a certain directional node is overlapping its mutual patrol node, the IID of that directional node is pushed into the array to be referenced a moment later.

    This is the Event/Action set-up I have at the moment...clearly it needs refinement or I wouldn't be requesting help! LOL

    EVENT

    SYSTEM For "NodePatrol" from 0 to DirectionalNode.Count-1

    SYSTEM Pick DirectionalNode instance loopindex("NodePatrol")

    DirectionalNode Is overlapping PatrolNode

    ACTION

    NodeCompassArray Push front DirectionalNode.IID on X axis

    I am thinking it might help that I also pick the nearest instance for each Patrol Node to be sure the right array is accessed.

    Now, this has met with SOME success, it seems. IIDs are getting pushed into the array instances appropriately, but repeatedly instead of ONCE (which is what the For loopindex is trying to answer). Each array instance is 4 cells in width with initial values of "A" (so I can determine that an IID of 0 is actually being stored and not simply the default value of an array cell). So if three Directional Nodes surround a Patrol Node, the array should only have 3 values in it...the fourth remaining "A". But there are times when all four cells receive a value...or receive a value that it shouldn't (like an IID that isn't actually touching the respective Patrol Node).

    I need to be sure I get this worked out or I made end up sending my enemy on a patrol straight through a WALL.

  • vee41 - That's what I thought. :) That's for the confirmation.

    fassFlash - I'll get right on it. LOL

Rhindon's avatar

Rhindon

Early Adopter

Member since 8 Jan, 2013

Twitter
Rhindon has 2 followers

Connect with Rhindon

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies