Rhindon's Forum Posts

  • Just a simple question to make sure I understand the "Is Within Angle" condition for objects...

    I checked the manual, but it wasn't quite as clear as I needed.

    Let's say that I want to check if an object's angle is at all close to 90*... I set the range to 5*.

    Does this mean that the game will check if the object's angle is between the range of 85* to 95* (a total range of 10*)?

    Or does it mean that the range totals 5* - 2.5* below and 2.5* above the target angle?

  • Construct 3 file: Tanks

    Below is my current set of instructions for scaling an "elevator" platform in a top-down perspective between layers, or "floors", amongst buildings of various heights. Each floor is scaled a factor of 0.1 larger than the floor below it, so that objects on each layer appear closer and larger, just as you might expect when looking at things up close or far away. No parallax is used.

    As seen below, each grayscale block, from black (and the brown roads) to light-gray, seen here represents a floor (on its own layer in the layout). Each layer used for the buildings is scaled from 1 (layer: GroundLevel) to 1.9 (layer: TenthLevel). The Elevator object is currently on the layer dubbed ThirdLevel (not necessarily the third layer, as the Tank and turrets get their own layer between layers GroundLevel and SecondLevel).

    The Set Up

    I have a 2D Array, ListOfFloors, which lists floors 1-10, starting at index 1 (for simplicity I simply do not use or store any value in index 0).

    There are two X axes. For each Y axis, Y(0) is the floor/layer value (tracked by the Elevator object instance variable Floor) and Y(1) sets the corresponding scale value for that layer. All of these values for the array are set at the start of the layout.

    So, for instance, if the Elevator.Floor value is 2, then the Array.At(X(2)Y(0)) value has the name of the layer, "SecondLevel". And the X(2)Y(1) value is 1.2 which sets the scale value for that layer (again, set at the start of the layout).

    The Flow

    This is how the I intend for it to work...

    • When the Elevator variable WaitTimeAtEachFloor reaches 0, whether moving up or down a floor, the Elevator object is automatically moved to the next floor/layer.
    • If the Elevator object moves up a floor, at the same time, its scale value is set to 0.1 less than that floor/layer's scale value. So if the floor has a scale value of 1.2, then the Elevator object is set to 1.1. This is because the Elevator is technically already moving up and above any object below it. Even if it is not yet to its target "elevation" of 1.2 on the second floor, it is still above the floor below. This is also so that any objects meant to be below it do not appear above it while the Elevator is in the process of "scaling up". The reverse is true while moving down. Once this is done, the TriggerFloorChange boolean of the Elevator object is set to false so to prevent continual floor changes during scaling.
    • While scaling, the Elevator object's scale value is tracked by its instance variable CurrentScale. Once it reaches its target scale value (as defined through the Array), the WaitTimeAtEachFloor is reset.

    The Problem

    The issue I'm having is that during the scaling and floor changing process, the Elevator object 1) occasionally seems to shift in its X/Y position (which I don't see with any of the other objects that represent the floors of the "buildings") and 2) the Elevator simply jumps from one scale size to the next instead of the gradual change as if it were steadily moving up and down in a smooth motion.

    The Elevator does appear to jump between floors/layers properly, simply without the gradual/fluid scaling I intended.

    Can anyone help me, please? Thank you very much!

  • By pure accident, I discovered the issue has to do with whether the project setting for Fullscreen Mode setting (low quality vs high quality). Little about it do I understand, but from the setting description, it has to do with when the image is rendered. That would seem to explain why I initially don't see an image. After changing it to high quality, the image shows up immediately and the quality of the image, obviously, is better.

    So, not a bug. Just user ignorance.

  • Bumping from second page...

    Ashley, any idea what may be the issue here? Any suggestions?

  • I'm not sure if this is a bug in C3, so I'm first posting here just in case it's a local issue or an easy fix I'm missing.

    I'm using Chrome (always updated to the latest version) and when I go to preview my game - either in tab view or in pop-up view - it shows just a blank, black screen. This issue is remedied by resizing the window. Evidence suggests that the game is running, just not viewable at first. The problem does not occur during debug mode, probably because the debug window loads alongside the game window causing some "resizing" within the browser.

    Any idea what is causing this? Is there a fix? Or should I report this as a bug?

  • Okay, I see what's going on now. Because I had it enabled from the beginning, the whole fade process was started the INSTANT it was created, despite that I had the Wait Time immediately updated in the exact next action in the same event. So the wait time, as defined in the editor parameters, was counting down as I had it at default.

    And, like you said, the Wait Time was getting updated, but it wasn't taking that info into account.

    So I told it not to have the Fadeout behavior active at first - only after I updated the Wait Time did I enable to Fadeout behavior. Now it's working as I wanted it.

    Thanks for helping me to work it out!

  • I do understand all that you said. Perhaps I was getting my words mixed up again...

    In any case, what I DO want us the Wait Time - before the fade out even behind - to last as long as there is fuel in the ship. Then fade out. Problem is that right after the Wall is created, it only takes the original value in the editor into consideration and begins to fade out almost immediately - NOT the minimum 5 seconds. Basically, there is no wait time being updated.

    Should I set the Fade out behavior to disabled first then enable after I update the Wait Time?

  • WHOOPS! That was a mistake. My image SHOULD have had the red arrow pointing at the WAIT time, not fade-out.

    I'm trying to set the Wait time to the ship's fuel value. But the Wait time is not getting updated upon creation of the Wall object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • C3 capx: https://www.dropbox.com/s/fv1jjt4a1sqg6hc/Space%20Shooter%20RPG.c3p?dl=1

    As the topic line states, I'm not sure if this is a bug or an aspect of the Fade behavior that I'm not aware of.

    In my game, the Wall objects will be randomly generated and their wait period will be determined by how much fuel is left in the spaceship at the start of that round. Once the fuel runs out, the Wall objects will fade out, destroy, and then will reset when the player starts the next round.

    However, when I create the objects and set their Wait Time parameter, then run the program, it creates the Wall objects as desired but it immediately begins to fade out after the original wait time (as designated in the editor but not as specified in the event line).

    Is this a bug that needs reporting or is it just an "unlisted" factor in how the Fade behavior works?

  • I FIGURED IT OUT!

    My problem was in the variable I was using in order to identify WHICH ShipCourse objects to update. I was telling it to identify all objects above the variable that counted which ShipCourse to create NEXT and NOT from the value of the object that was deleted! So, if I had created up to four objects, the variable I had been using would have been 4. So if I deleted, say, the first object, the value was still 4 (or rather 3 after calculations), so it wasn't counting all the way back to the first object which was the deleted one.

    I created a new variable that stored the value of the deleted ShipCourse object and told it to update all objects AFTER that value (the one that was deleted). Thank you, guys, very much for your help all the same! I'm very grateful for your time.

  • WOOPS! The edge of the picture cut off the details of what I'm trying to do.

    tarek2 - Thank you for your capx. That's pretty much what I'm trying to do, yes.

  • tarek2 - Thank you for pointing that out to me. The action should have been Subtract 1 from Self.OrderID. I have now corrected that.

    The "Battlefield" is a space on the screen where all the action takes place. I don't want the player tapping just anywhere and the destination markers (the ShipCourse objects) appearing where they shouldn't. The player can tap elsewhere on the screen, such as selecting a weapon type, as well. So the goal is to designate where the following actions will take place.

    Here's how it should go...

    https://www.dropbox.com/s/jq4228tm8le6mm3/Space%20Shooter%20RPG%203.png?dl=1

  • So this is what I edited my event sheet to...just as you suggested along with the particulars for what I'm trying to do...

    https://www.dropbox.com/s/7wjnn7vs33kdxhk/Space%20Shooter%20RPG%202.png?dl=1

    The OrderID instance variable is pre-assigned to each of the ShipCourse objects.

    Each ShipCourse object has animation frames (speed 0) of all the ShipCourse images lower than itself, as well. So, if ShipCourse3 (one of the objects in the ShipCourse family object) has its OrderID value decreased by 1, it will then appear to be ShipCourse2, and so on until it is destroyed. Basically, each ShipCourse object simply updates its appearance when an instance object is deleted.

    The check on the OrderID value is just to make sure that ONLY the ShipCourse objects that were created after the one being deleted are updated in their appearance.

    All that said, I implemented your advice and it still will not work as it should.

  • Thank you, The multiple "Is Touching" conditions are to make sure certain events don't take place - such as tapping an enemy, which is later going to be used as a different feature. I'll implement your suggestions and see how it works!

  • Please bear with me, this issue I'm having has a few facets to it. I'll try to be clear and brief as possible. Thanks in advance for your help and suggestions.

    I'm working on a "turn-based" style of mobile space shooter. Every wave is preceded by an opportunity for the player to tap in the "action area" (where the spaceship and enemies exist) and lay down up to five destination points. Upon activating the action for that wave, the spaceship will follow those points in the order they were created. During this pre-action phase, the player can tap any existing destination point already laid down to delete it. Any destination points that were created after the one being deleted will have their order values decreased - so destination point 4 will become the new 3 when destination point 3 is deleted.

    This is a screenshot of my current set up - and I've tried SEVERAL variations (including using a tilemap...but I couldn't work out getting the correct X/Y coordinates for Pathfinder to follow).

    https://www.dropbox.com/s/tcsw8znp9g8enax/Space%20Shooter%20RPG.png?dl=1

    The problem I have discovered is that the deletion portion of my script here acts immediately after the creation of the ShipCourse objects, even though I added the stipulation of ON TOUCH END. It shouldn't delete anything YET because the object hasn't even been created until AFTER the touch is finished. At least...that's the check-n-balance I'm trying to work out. I've also tried using the ELSE condition to differentiate between when a ShipCourse object is being created or deleted.

    I am quite certain there's a nuance in the way C2/3 reads conditions versus how I understand them. I'd be very grateful for some insight and help. Thanks again!