Rhindon's Recent Forum Activity

  • 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!

  • Ooooh, okay. I see. I guess I didn't realize to what extent the On Touch End worked. Alrighty then. Thanks, guys!

  • I'm not sure that will work. Do you mean to use those two conditions in the same singular event line?

  • The subject line says it all.

    While there are condition checks for when a Touch comes to an end, there's nothing for when touching a specific object stops. This can be very handy for when, for example, a player is holding a long-press over an object (or dragging said object) and then releases it. You don't want to test SIMPLE when the long-press is released, but when a long-press over an object is released.

  • [Please pardon my exuberant emotional outburst of joy. ... Given my struggles at game design and learning C2, I feel I've earned it. LOL] IT WOOOOORKED!!!!! Absolutely PERFECTLY!!! Exactly as I planning. Thank you again!

Rhindon's avatar

Rhindon

Early Adopter

Member since 8 Jan, 2013

Twitter
Rhindon has 2 followers

Connect with Rhindon

Trophy Case

  • 12-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

19/44
How to earn trophies