jwilkins's Forum Posts

  • Alright, I figured this out! Funky Koval I wasn't sure how to even approach the suggestion you put forth (thank you all the same) and I was concerned that it wouldn't easily allow for things like Z axis rotation being reflected on the collision checking sprites.

    Ultimately what I did was add 4 image points to the Billboard Sprites on the 3D layer that correspond to their top, bottom, left, and right sides (effectively recreating bounding boxes)

    Then after spawning the collision checking sprites on their 2D layer at the 3DCamera.LayerToLayer positions, I set their size using the distance from the image points on the 3D layer:

    Finally, if you want to set the angle of the 2D collision checker to the billboard sprites Offset Z, you do so with those same imagepoints:

    Ultimately I am going to try using this to create a pseudo-3D collision checking system for attacks/enemies. Attacks will first need to collide on the 3D layer, then the game will run this separate check to see if they collide on screen.

    This approach works in this dungeon crawler view where the camera is going to be pretty static during combat, I don't know how well it would work elsewhere.

  • Context: Ultimately what I am trying to do is check to see if objects on a 3D layer overlap with objects on a 2D layer.

    I have sprites utilizing the new billboard feature in a 3D Layer (Red Circles).

    When I want to check if they overlap objects on a 2D layer, I spawn collision checking objects at the correct locations using 3DCamera.LayerToLayerX/Y. These are the green circles above, it works perfect!

    The problem is then in getting them to properly resize to cover the same space the objects on the 3D layer do. I originally tried to convert their BBoxRight-BBoxLeft/BBoxBottom-BBoxTop values for the size, but this didn't work:

    Which kind of makes sense to me, but now I am not sure how I should be approaching this. How can I determine the size of the 3D objects when converted for the 2D layer?

  • Everade ah! That seems so obvious now, in my head I assumed that this didn't need DT because behaviors already utilize DT and I was using a behavior, but that's not the case.

    This function is not called every tick, it is called while the player is inputting a movement direction (which I suppose is every tick that it is needed) and deceleration is handled by the 8-Direction behavior. Would I still need use "TimeElapsedSinceLastExecution" in that case?

  • I have a project using the 3D camera, a twin-stick shooter. When the player inputs movement (via either the keyboard WASD or the Gamepad Analog stick) it runs this function:

    It needs to do this to calculate the angle of the camera and the movement direction, and also lerps to the players maximum speed.

    This works fine provided the system keeps running at a solid 60FPS, but if it drops, the players movement stutters a great deal and either very slowly or never reaches full speed (but mostly only when running it exported, not when previewing it?)

    Any idea on why this is happening and how to fix it? I am half tempted to rip the 8 Direction movement out.

  • oosyrag Thank you so much, this works perfectly, and I appreciate you following up to track down that layout issue. Very appreciated!

  • dropbox.com/scl/fi/z09ckm4w7a2jsb8emsw5u/objectselfcollisionsexample.c3p

    I appreciate this a great deal! Unfortunately there must be something else going on because copying that solution exactly (and turning on the random UID pick) still ends up destroying all instances.

    I have a theory that it could be due to my procedural generator. Currently the generator fills out a tilemap, and based on a dice roll it will create a random number of BluePrintGenerators all at the same time in this process.

    In your example the objects are created one at a time over time, could this be an issue?

  • Thank you for the reply. I've used those actions in other ways but not for this specifically.

    I tried this and it still does not work, now it's not seemingly destroying any of them:

    If I place it outside of the function it does delete them over a couple of seconds... but it deletes ALL of them but one.

  • I know this question has been asked many times before, and I have looked into those threads and used them as the basis for what I have created, but I cannot seem to get this to work.

    I have a BlueprintGenerator object, which is also the only object in the BluePrintDifferentiator Family. I spawn these when I generate a dungeon level, and now I want to check for any BluePrintDifferentiators that are overlapping the current BlueprintGenerator object and destroy them.

    But instead this just deletes ALL of them. There are no BlueprintGenerators in the layout after this runs. I thought that maybe the issue was that the BlueprintGenerators flagged themselves as BluePrintDifferentiators that are overlapping (hence the UID check) but this did nothing.

    What's wrong and how do I get the desired affect?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Recently started retrofitting a project that was using the persist behavior to keep track of this sort of thing. I can't use persist anymore because I am writing my own save system as well.

    I feel like I am overcomplicating this, and I don't know the proper terms to google in order to find useful information, so any help or resources on this would be very appreciated. Anyways, here is a scenario to illustrate:

    I have a "BarrierSprite" and an "EventDictionary". This barrier prevents the player from moving forward until something is accomplished. Currently my barrier considers the following:

    1. What is the name of the event that triggers me? Typically this is done by a player colliding with an invisible object, or killing a specific enemy, or collecting an item.
    2. Does the barrier trigger another event when it is triggered?
    3. Am I turned "on" or "off" by other events? In other words are there any events that prevent me or are required to be triggered before I can be triggered?

    With the persist behavior this more or less worked fine, but even then it felt bloated and now that I am trying to track this myself its not ideal.

    Tagged:

  • You do not have permission to view this post

  • Couldn’t you just do “$”&TotalCash/100

    *facepalm* yeah... I could. Thanks!

  • Context: I am storing the players money as a whole number (lets say, 894) and I want it to display as "$8.94" in the UI.

    I start with:

    "$"&TotalCash

    But I don't know where to go from there to add the "." before the final 2 characters in the string. I know that "left(text, count)" will get me the index, but how do I insert that in? Thank you!

  • Urgh, was really hoping this wasn't just a quirk of 3D in Construct and that I was missing something.

    I think I'm just going to design around the issue for the time being. I did find what I think is the effect you were mentioning but it states it must be the only effect in use on the object which is a no-go for me.

    The main gameplay issue I had with this was that large attacks at the default Z Elevation would obfuscate too much of the enemies underneath me when it didn't render the transparency. I can solve this by adding a value to the attacks that lets me customize the Z elevation and spawn them lower, so more of the enemy is seen. It might not look great all the time, but it shouldn't impact gameplay much at least.

  • Here's another example of the same issue, the dagger stuck in the player's billboard sprite is clipping the player with it's transparency:

    This only seems to happen when the sprite is closer to the camera than the object it is clipping through, which makes some sense since Draw Order is set to Camera Distance for these layers.

  • Here's a screenshot example of my issue with the problem circled:

    Based on the 3D documentation and best practices, I believe I have properly setup my layers, but my understanding is that this shouldn't be an issue for 2D objects in the first place. 3D objects with transparency and 3D objects with no transparency need to be in separate layers. I have all 2D effects on a separate layer as well:

    This issue is generally not that big a deal outside of sprites that I scale up and that have large areas of semi-transparency.

    I should also note that I have tried moving the "2d Effects" layer (where the sprites are located) both above and below the opaque/transparent layers to no effect. Some of the 2D sprites use additive blending as well.