Rhindon's Forum Posts

  • Those uppity triggers, man. You'd think they'd play by the rules. :P

    I think I'll try to adopt your rule about triggers, myself, just to save on future issues.

  • A simple-enough update. Not a problem, and thank you! :)

    Though, I don't see how my logic is off, per se, given that Else conditions - so I thought - only worked in relationship to the previous event condition of the same level. So long as event line 6 was true, Else gets ignored entirely, regardless of what happens later in the sub-events following line 6. But if that's not the case - or if a trigger alters that - then Else events are, to my thinking, not so clear as they should be.

  • I'm working on setting up a custom pause feature built around tracking current and past dt values. This why I will have an easier time - I believe - at controlling what I want paused and what I want to continue to function. (I am aware that there is a way to manipulate the individual timescales of objects, but I seem to remember a long time ago that this did not serve my purposes...it's a bit beside the point at the moment, I think.)

    The issue I'm having right now is that the Else condition event line seems to be activating even when the boolean test condition above it is true. What should be happening is that event line 6 tests if the condition is true. If it's true, it skips event line 8. If event line 6 is false, it skips to event line 8 and runs the Else-condition actions. It's one OR the other.

    But because of the sub-event at event line 7, the sudden change of the boolean value seems to prematurely trigger the Else condition into thinking that event line 6 was false after all. Because the Else checks for the true or false outcome of the conditions laid out in the previous parent event line I would THINK that the change in the value of the boolean in a sub-event wouldn't matter.

    Am I missing something?

  • If you need to check if any of the picked doors have the same LayerDepthLevel as in Spy, you need to rewrite this condition:

    Doors compare variable LayerDepthLevel=Spy.LayerDepthLevel

    It really was that simple. Thank you for enduring my long post, though. I appreciate your time a great deal.

  • Ya know, that has ran across my mind but I hadn't checked for it. I'll try that later on lunch break... Go figure that that will likely be all that needs to be done.

  • Bear with me, please...I'm going to try to articulate the set-up and the problem in as clear and brief a way as I can...but I sometimes struggle to do both.

    PREMISE:

    My game, "Mr Spy", is set in a 2D platformer environment where Mr Spy (hereafter, "Spy") must move stealthily through an office environment to complete his mission. The game is inspired by the classic arcade game, "Elevator Action". However, I'm taking the use of the multiple doors in the original game to a whole other level by making it to where you can enter the doors and explore additional hallways and office rooms.

    SET UP:

    The game levels will be comprised of three sections:

    1. The main hallway which is almost completely unobstructed from end to end...not unlike your traditional platformer like the Super Mario Bros. series. The Main serves as a kind of "hub" for all other rooms and hallways connected to it via the doors.

    2. Backrooms or parallel hallways. *

    3. Front rooms or parallel hallways. *

    * The back and front rooms (or hallways) all run parallel to the main hallway. Entering a door will take you to the front or back areas depending on which door you enter. The layers I have - besides being set up for background and foreground objects and such - are situated to so that layers in the front or back of the main hallway serve as the back or front rooms (...or hallways...you get the idea).

    From the image above, you can see how I've grouped all my layers together to essentially act as slices of theoretical "group layers". The main "group layer" has two layers for the doors that lead to the back and to the front group layers (which amount to the front and back rooms). Each of these grouped layers I've assigned a "LayerDepthLevel" - 0: back, 1: main, and 2: front. The main, of course, has two doors that lead away from it. Spy also has a LayerDepthLevel variable assigned to him, as well. This is to identify that Spy is in the same layer group as the door he is trying to use. That way, if Spy is overlapping a door in the front group layer but he's all the way in the back, he can't use that door. Each Door is also assigned a "MoveSpyToThisLayer" variable so that, when conditions are right, each door assigns to Spy which layer he's supposed to be moved to. (This assignment of values is set up at the Start Of Layout and is tested by which layer the Doors are on to begin with. I try to set things up so that I have to do as little manual work as possible given that there will be tons of doors throughout the game.)

    I have four types of doors grouped together in a Family (Doors) - they all act essentially the same but are specifically created for each layer they are found on. But this is where the problem begins...

    PROBLEM:

    When moving between layers - from front to main or main to back or vise versa - there will be two doors that overlap each other. These two doors are separate objects that, as described above, serve the same function. I want to make it so that when overlapping these two doors, they both open as if they were one door (because it would look weird if one door animated opening but the other door remained closed when peeking through the first door). However, only the door that is on the same LayerDepthLevel should be referenced when deciding how Spy should move from one layer (and LayerDepthLevel) to the target layer.

    This is my current event sheet...

    I'll try to explain what's going on per event line #...

    70 - Check if Spy is overlapping any of the four door objects (as found on the four layers designated for the doors)

    71 - Determine if the doors being overlapped share the same LayerDepthLevel values. Meaning, while the doors and Spy may be on different actual layers, are they part of the same layer group? If yes, proceed... (The OverlappingDoorActive boolean is for another feature and not relevant here.)

    72 - If the DoorInUse value is false, meaning that Spy (nor any enemies) are not using the door and that the door is done with its open/close animation, when the player presses A make it so Spy cannot move (he's about to "walk through" a door, after all), set the DoorInUse boolean to true so that the door cannot be used by any other characters and that repeatedly pressing A cannot prematurely trigger any other action, and set the Door animation to "Opening". (The ActionAvailable boolean is not relevant here.)

    NOTE: There are two door objects in question when moving to and from a back layer group and main, and to and from a main layer group and front. The best way to understand this is with this sketch I did...

    Each door pair is what links the front to the main and the main to the back layer groups. This is important to understand for the next set of event lines.

    73 - Pick the Door that has the same LayerDepthLevel value as Spy and check for when that Door has the animation frame value of 9 (halfway through the animation). Move Spy to the destination layer that Spy should be on when moving through that Door (and update Spy's new LayerDepthLevel value accordingly). However, there are two Doors still being overlapped at this point which is why it is necessary to use a Pick By Comparison at this point.

    74 - For another feature, thus irrelevant.

    75 - Once the Doors have finished their animations, set them to useable again and update their animation.

    HOPEFULLY, that extensive breakdown sets all things clearly as to what is SUPPOSED to happen. The problem is that when the two doors are overlapping each other, the intended action of the door opening, Spy going to his target layer (and all values updating), and the doors closing to be used again does not actually work. When I have the doors NOT overlapping, Spy can go through a door, end up on the correct layer with the correct variable values, and then use the OTHER door to return back to his originally starting layer and everything works. It is only when the two doors (acting as one as I intend them to) are overlapping does NONE of this work.

    For some reason, I suspect, the issue is that event line 71, but I cannot figure out what's the actual deal and why it's not working.

    Can I get some expert insight, please, to help me figure this out? Thank you!

    (EDIT: I don't know why my last image appeared rotated like that... Mentally rotate 90* counter-clockwise to see it correctly.)

  • At one time I thought there was a way to resize the viewport - the dimensions of the game when played on the screen. But I cannot seem to find it.

    I imagine that the alternative would be to scale all the relevant layers to accomplish the zoom-in/zoom-out function I want to test.

  • Thank you, I look forward to reviewing that after work today.

  • FromChris - It would still create the same issue...just with smaller hitboxes. The space between the character and the box would visually be smaller, however, so that would solve that matter. But it would still arguably create a slightly bouncy effect of the box being pushed ahead and then the character playing catch up a split-second later. Presently, however, the matter is about 99% resolved for my present needs.

  • dop2000 - Once again, thank you! Your work helped me out greatly.

    I took what you offered me and set it up just a tad different but the end results are virtually identical.

    The only issue I'm still having is that there is a very minimal "bounce" between the Box being pushed and when the Spy catches up to continue pushing it. For the sake of my proof of concept, I'm not worried about this, but eventually, I'd like to clean up that little nuance as I want to produce the smoothest looking effect as possible. Any insight you have would be greatly appreciated.

  • dop2000 - I. Am. Amazed.

    That pretty much solves my issue. THANK YOU!

    I'm only mad because for all my time using Construct, things like this - so simple! - evade me. I'm extremely grateful for your help. God bless you!

  • Good day!

    I'm working on recreating the classic "Elevator Action" arcade game but with a few of my own twists as a "proof of concept" project for a larger game I'm working on.

    One thing I'm trying to do is to make it so a box ("Box" object) is "pushed" along depending on which side the Spy ("Spy" object...I'm sensing a trend here) is moving against it.

    For the most part, the action works, albeit, a bit jerky. The main problem is that on occasion there seems to be an overlap of the Spy and Box objects and the process comes to a halt (however, I can move away from the Box and things continue as normal).

    I want to accomplish two things:

    1. the Box appears to move as close to Spy as possible without the "bouncy" effect of the Box moving forward then stopping.

    2. prevent the overlap which causes both the Box and Spy from soft-locking in their movements.

    Both Spy and Box have the Platform behavior and the Box also has the Solid behavior

    Box has an additional object Pinned to it to detect when Spy is close enough to "push" the Box.

    I set the movement speed for both the Box and Spy either equal or the Box is 1 pps faster.

    This is a screenshot of my current event sheet:

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually, yes, I had just looked that up late last night. LOL

  • I'm working on a spy game and, before I go working on my own custom "audio" system for this mechanic feature, I wanted to confirm if there is a way to make it so my characters or objects in the game can generate sound effects at their location... And from that make it so other characters or objects can "detect" the sound if they're close enough. Kind of like a line-of-sight deal but with audio.

    Related, this would also include later adding a feature where the player hears the audio in stereo panning (louder on the left speaker if the sound was generated to the left of the camera or character's position, etc).

    It seems like I saw Construct having a feature where you could place "speaker objects" in the layout to represent that that object or another object attached to the speaker would generate a sound effect when prompted but I cannot find it.

    UPDATE: So, I found about half the info I was looking for, thanks to the included audio template that comes with C3. I had forgotten about that.

    The remaining issue is a VIABLE way to get enemies or objects to "hear" sounds. Given the built-in feature that allows sounds to be played back at lower dB depending on proximity and distance, what is a good rule-of-thumb measurement in pixels to determine when an object can reasonably "hear" a sound? I realize this is all subjective. But I would appreciate any input to help me sort this out.

    Does anyone have any suggestions or know what I'm trying to work out?

    Thank you so much for your help.

  • R0J0hound - Thank you for your input. That seems to be a bit more feasible. An incredible mental challenge...but feasible.

    Taking into account what you've gone over...

    Road types: While I would love to have a game along the lines of Need For Speed: Most Wanted (my favorite full-city sandbox racing game) with all manner of city road types, I plan to keep the road types/widths uniform. I don't think there will be any real exceptions even when it comes to the awkward-angled intersections. For the game missions, there might be some unique side roads or "pit stop" areas, but nothing exotic or exceedingly out of the norm.

    Intersections: Probably the most challenging given the layout of the city. The trick will be how to merge two sides of the roads coming together when the road lines are considered. Alternatively, I could simply draw custom sprites for the intersections. It would be a lot...but far better than trying to work out a system to merge roads...especially ones coming in at angles.

    Road heights and bridges: My plan so far is to have 3 levels, minimum: Ground level, upper level (overpasses, "major" roadways that act kinda like shortcuts between districts), and underground. Alternatively, I was thinking about having the "ground level" have its own progressive elevations throughout the city...much like the real city this is based on. But initial efforts have proven this may not be as timely as I'd like as it would require a lot of manual editing. I'm probably going to resort to keeping the ground level completely flat and having the roads shift between specified elevation levels or just keep it at a strict "ground", "upper", and "underground" for simplicity...

    Analog roads: And that's where the trick comes in. The careful plotting of road pieces - many, many of them - that create the semblance of progressive turns and angles. Without drawing them out, the angles of the straight roads connecting will be obvious. That's fine. All of that you mentioned. Then I could connect them all by the custom-drawn intersections sprites.

    Drawing roads in-game: My plan does include road segments being constructed along the lengths of lines placed in the editor and then actually spawned when the player car is within range. I've also been trying to figure out if utilizing an Array contained with respective road pieces might help generate roads in-game when the player is nearby.