Rhindon's Forum Posts

  • R0J0hound That's not a bad idea. I can see that working and probably having the same issues you just mentioned. I'll give that a shot and try to refine it if the cos( ) and sin( ) expressions don't work the way I want them to...they should, though, since there's an Example in the C3 start page that literally uses those math expressions.

  • mOOnpunk - Yeah, I should have clarified that better (I updated my post accordingly).

    They are just 2D sprites in the layout and then At Start Of Layout, I stack a series of other sprites at increments along the Z axis. So, yeah, not real 3D walls.

  • WHAT I'M TRYING TO DO

    The custom Camera System I'm trying to set up is to have the 3D Camera follow behind the Player and rotate around accordingly. The Camera will be set to the end of the Camera Arm (which, itself, will be attached to the Player). The Camera will be set to the Arm's image point at the far end.

    As the Arm will do the actual rotating - the Camera being "along for the ride" - to avoid having the Camera on the opposite side of the "3D Walls" (a series of 2D sprites stacked via Z Elevation) and thereby having the view obstructed, I want the width of the Arm to be dynamically reduced to keep the Camera within the boundaries of the Wall. This would mean the Camera is momentarily brought closer to the Player...but as the Player moves away from the Wall, the Arm will grow back to its maximum width and the Camera will likewise be farther from the Player.

    I want to use Ray Casting (Line of Sight behavior given to the Arm) to determine if the Arm is overlapping a Wall and automatically adjust the Width of the Arm so that it is not extending past the closest edge of the Wall to the Player. This would keep the Camera inside the immediate surrounding boundaries of the Player.

    GREEN TRIANGLE: Player

    BLUE ARROW: Player facing direction

    GREEN ARROW: Indicates Player rotation

    RED BOX: Camera Arm (origin point is at the right-most end, attached to the Player)

    ORANGE ARROW: Ray Cast

    The Ray Cast is meant to say, "This far to the Wall from the Player...the Arm should not be any longer than this value."

    PROBLEM

    Besides the fact that this isn't working and thus the need for this post asking for help?

    Right now, the Arm is not updating its width.

    I added a Global Variable to test if the Ray Cast intersection is returning a True value. ...it is not.

    From reading the C3 Manual, It is my understanding that using the action Cast LOS Ray from /origin/ to /target/ will return a True or False and can be used in conjunction with the condition LOS Ray Intersected.

    The problem I'm facing is that there doesn't seem to be a True value returned when I cast the Ray. I want to specify which Wall to cast to and yet nothing works. The Global Variable always remains its initial value of 0.

    This is the latest configuration of events I've tried (I've had it used as a dual condition with LOS Ray Intersected before moving it up to event line 3):

    I would be glad for some insight and help to better understand how Ray Cast works so I can utilize it properly.

    THANKS!

    EDIT: PROBLEM RESOLVED

    I discovered that objects that could potentially register as a "hit" or intersection alone the Ray Cast line must have a Solid behavior. So not just any object in the Layout will trigger a Ray Cast "hit".

    This was tested by opening the "Instant hit laser" C3 example (find it through the Start Page tab) where I added a basic sprite. The laser when right through my sprite but not through the Rock sprites included in the example. I noticed a major difference between my sprite and the Rocks - the Solid behavior. I disabled the Solid behavior on the Rocks and the laser when through them, just as it did with my sprite. I further tested this in my project and added the Solid behavior on the sprite I was testing an intersection on...and the thing worked! A "hit" was detected.

  • R0J0hound I believe I understand. Experimentation, indeed, is called for. But since this is for a game jam, I'm going to have to save that for another time. It's not a critical feature, thankfully. Thank you!

  • FURTHER INFO: The layer that the Flashlight object is on has "force own texture" checked and the Flashlight object, itself, is using the Destination Out blend option.

    This is the part that works fine.

    In order to make it so that the hidden objects on the floor stay hidden while the walls are visible, I'm trying to set it up so that the layer with "force own texture" is 75% opaque while trying to find the setting(s) that make it so the obstacle is invisible until it is overlapped with the Flashlight. It is that last part that I'm having trouble with.

    What layer do I put the obstacle on?

    What blend mode do I set it to? Or do I need to set another layer to a blend mode? Both?

    What other layers do I need to set to "force own texture"?

    I sort of understand "source" and "destination". My current understanding is that "source" is the object on top and usually the object with the blend mode active. "Destination" is the object below the "source" and sometimes on another layer.

  • dop2000 or R0J0hound - May I request either of your help, please?

  • In the Example Browser in the C3 editor (see the Start tab), there is an example called, "Simple Lighting" that shows how to create a kind of "top-down flashlight" (or a light shining against a wall ahead of you...depends on your perspective, I guess). This is simple enough and I have used it many times before in past projects.

    What I want to do is a bit more complicated (or so I think...I honestly still struggle to understand how the blending properties work).

    I want to make it so that objects highlighted by the flashlight beam (overlap object) are visible to the player during gameplay.

    The basic level environment I don't need to be part of the blending equation. I just need to know how to do what amounts to "layered blending".

    Here is the current .C3P file as it is so far...https://drive.google.com/file/d/1DMVDP5RRhxB79eYiFfMftpbi42bbLEH7/view?usp=drive_link

    Thank you!

  • WackyToaster That seems so obvious now that you present it to me. HA! Go figure...

    I did check the manual to read up on the actual For Each (Ordered) condition but I didn't think to look up anything on Z Ordering.

    THANK YOU! I'll give that a go.

  • GOAL

    To sort instances of the enemy Hunters and the main character, Buster, according to their Y position in the layout so that characters farther up on the layout appear behind characters farther down. This needs to be updated every tick as characters - enemies and Buster alike - move around.

    SET UP

    I created two Families with the same sprite objects to compare instances of the Hunter character against each other as if they were literally two separate objects. Buster and the Hunters will be in front of or behind each other depending on their position on the Y axis. The idea is that the camera is above and slightly behind the characters for that "angled down and forward" perspective...albeit in 2D.

    PROBLEM

    ...The problem is that it's not working (why else would I make this post, right?).

    Basically, what I want to do is what you can see in this image...but reversed. What's in the image is backward from what I want. The problem is that I have tried swapping out the conditions in various arrangements but I cannot get it to work right. Sometimes one instance will work properly but the others will not. In one case, as I moved Buster up and down, the Hunter instances would move in front and to the back of each other for no apparent reason (they're all stationary except for Buster).

    This is my latest event sheet attempt... At one point, I had this working for the Hunter instances but I had forgotten to account for Buster as he moved along. And thus my new problem here.

    Your help would be greatly appreciated. Thank you.

  • dop2000 Aaaaaand there you have it - a successful edit.

    I was hoping the On Collision trigger would suffice as I needed something that would isolate the events the way I needed it. But it seems this will work just fine.

    THANKS as always!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000 - Thank you. I will try that and get back to you with a yay or nay.

  • SET UP

    In order to account for the possibility that my Character, "Buster", will collide with multiple instances of the Enemy at the same time, I want to isolate the closest Enemy in this rare occurrence. The reason for this is because Buster is going to attempt to "possess" the Enemy and so the possession loop is triggered. But he can only (attempt to) possess one Enemy at a time. So I need to make sure the right Enemy is isolated in a manner that makes sense to the player.

    PROBLEM

    The issue I'm having is that the same Enemy is picked when using Pick Nearest condition no matter how close or far away the Enemy is when two instances of Enemies are collided with at the same time.

    ATTEMPT TO SOLVE

    I have tried to isolate the Collision and Pick Nearest conditions per someone else's suggestion in Discord. However, I'm still getting the same problem. Previously, I had Pick Nearest in the same condition line as the Collision check. I don't think the order of the condition checks is the issue, because I need to pick all Enemies that are being collided with and then pick the closest one.

    Ultimately, I'm confused as to why this isn't working. Insight would be appreciated.

  • Excuse me while I gaze in dumbfounded awe at the lightbulb that just went on above my head.

    Touch ID VS Nth Touch.

    ...it suddenly dawns on me that these are, in fact, as you just said, two different things. I just assumed they were the same. That the Nth Touch is its ID. That would explain why I was having trouble.

    I honestly did take a look at several of the Touch examples before I even got to work but I couldn't find what I was looking for in the available examples - it's possible I didn't look enough or didn't know which one to look at. Anyway... I will keep that in mind when I later implement Touch in my project. Things are working now as I have them but I'm not done yet with my Touch controls...

    I'm quite certain now that you're correct about it being a bug in my events.

    Thanks for your time and patience!

  • R0J0hound

    I tried to isolate the problem further...

    I set it so that it checks if any Touch ends then set the Touch_ID value to -1 (I made the initial value of Touch_ID to be 0 in this test).

    This basically ignores the On Touch condition for now.

    And...it worked. So, my novice understanding of things leaves me with a couple of conclusions:

    1. On Nth Touch Ends is failing to register or recognize the value sent to it (via Touch_ID).

    2. It has something to do with the fact that the Nth Touch is being held (remains in touch for a time) before it later comes to an end and so On Nth Touch Ends spazzes.

    Shall I submit this as a bug? What do you suppose?

  • R0J0hound And that's what I thought I was doing.

    I disabled the "while in touch" line so that there's only "On Touch Start" and "One Touch End", calling on the TouchID value. Touch Start works... Touch End never registers.