AmpedRobot's Forum Posts

  • Thank you, Asmodean.

    That code rules.

    And thank you for the introduction on instance variables.

    I'll be sure to credit you.

    Plinkie, thanks for the input. I did experiment with toggling wait before, but it produced weird results.

    I stopped at Asmodean's code because it really works and is unbreakable.

    A little thing like that would've made the game look really unprofessional.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Uhm, did I become some sort of a Construct 2 social pariah after my monetisation post?

    I just didn't see the built in objects. They were new to me.

    Before people were helping.

    Now, no one is helping.

    This is very disappointing.

    If this bugginess is a normal part of Construct 2, I really wish I hadn't bought my license as it seems to glitch on the simplest things.

  • Here's the RojoHound version.

    This one glitches when you release the up and right arrow keys right after collision.

    The player usually falls twice from respawn point.

    http://www.darksunpictures.com/public/r ... h_new.capx

    ---

    Ideally, I would also like to block movement until player falls to ground and have the angle fixed while falling downward, but I dare not even attempt this until the above is solved.

  • Here is the capx.

    http://www.darksunpictures.com/public/DEATH_GLITCH.capx

    Basically to replicate the glitch, keep pressing the right and up arrows at the same time while aiming at the flashing object.

    Very shortly, you should begin respawning twice intermittently while in the air.

    Can anybody confirm the error?

    Found a fix?

    ----

    This seems solved by RojoHound's portal spawner thingamjiger at another object with associated goodies.

    I've only had it glitch once, but I haven't been able to replicate the glitch since despite my best efforts.

    ---

    I really don't understand it. Now, it's glitching all the time UNLESS u hold both arrow keys, so if you allow the player sprite to fall after collission it almost always falls twice, which is what I don't want as it looks like an obvious glitch.

  • Hi, all.

    Not sure what I'm doing wrong.

    Doing a first player death sequence on collision with sprite and it works fine for the most part, but occasionally glitches twice.

    --

    player-on collision with - set to player death animation

    wait 1.0 seconds

    player - set animation default

    player - set position x y

    --

    I tried it also with destroying the player and then system create object again, but it does glitch again when it falls occasionally.

    The player spawn sequence is the default from the Scirra template (if player is outside layout, move player to position x).

    The glitching is the player occasionally falling twice.

    Anybody saw this, solved it?

    Why does it happen?

    What's the proper coding sequence?

    --

    I added the collisions enabled as second flag as recommended by a you tube video (seems better), but still glitches occasionally (falls twice).

    --

    there is the destroy player - restart layout alternative (only foolproof one?) but I wanted to do it without spawning the layout again (or saving the previous one).

    --

    putting everything in a function but but the switching of animation seems to make it glitch the least (like 1 out of 20 tries), but if anyone has a foolproof solution, would very much appreciate it.

    and it seems to happen mostly when holding a key - like simulate platform pressing left etc.

    --

    could it be because the player is colliding with an animated object - 2 frames? and the collision condition only specifies the 1st frame? don't think so.

  • Has anyone tested the Facebook virtual good sales features via Construct 2 at least?

    ---

    I'm gonna mark this as solved as I found some more info by Googling this forum as opposed to straight Googling.

    I'm actually impressed by the functionality that's currently available in C2 out of the box with regards to monetisation.

    NVM!

  • Hey, guys.

    Question about offering virtual in game goods in Construct 2 for real cash.

    (Mind you this would be only optional in the game I'm making if somebody really wants to step it up occasionally for virtual invincibility, which can be fun).

    I found so many tutorials, many of them defunct or only applicable to specific operating systems like Windows 8.

    So...

    1) Is Facebook right now the best way to sell virtual in game goods via Construct 2? If not, what is? What are the other options for iOS, Android? PC? Mac? PS4? XBox?

    2) If I follow the Scirra publish to Facebook tutorial and then do all the necessary Facebook steps to set up, will I be able to offer optional virtual good sales within my game?

    3) What are the best options for integrating ads?

    4) Are these ad integrating options the industry standard for other developers (Cocos, etc.) or some plugins specific just to Construct 2?

    5) What are the industry standard options for integrating ads/virtual good sales?

    This is of some importance to me because I'm trying to decide whether to publish a Construct 2 game at all once I have the prototype done or go straight into Unity for a remake.

    I am not knocking Construct 2 here at all because I think it's great proto-typing software and I think there could be some initial publicity value, even before the Unity versions are done, but I would like to offer the game with all its intended features and make sure I don't fall into any pitfalls like shady/buggy/not widely used 3rd party plugins which could compromise the game/not realize full revenue potential.

  • Wow, thank you.

    Much obliged.

  • Wow, blackhornet.

    Thank you.

    I owe ya.

    Such a simple change.

    I didn't even know you could access that (not sure I would've thought of it, even if i did; well maybe after some brainstorming, that's assuming I knew it existed as I've surprised myself with the arrays).

    I would like to learn functions, but they look fancy to me.

    I don't know the coding process or the logic.

    Sort of like arrays. They look scary, a little bit like driving off the cliff, but you're glad once you did it.

    Any suggestions as far as resources to learn how to use functions (a kindergartener's manual for Construct 2)?

    I don't really understand the logic or the coding from the capx examples I've been able to download.

    <----AmpedRobot----> throws virtual items at the blackhornet from games not yet made.

    Must code to finish something!

    Wait, I don't must anything.

    I actually enjoy it, ha ha.

  • This is a corollary to my post about filling a 1D array with an incremented variable.

    I then wanted to pick 4 unique non-repeating values out of that array, which wasn't difficult to code by using another array, but the non-repeating part has proven a bit of a challenge. Basically I have a roller with Choose, but to make sure the values don't repeat I delete the rolled value out of the original array.

    The problem then is that rarely, depending on the odds, I get a 0 value out of the 4 chosen when it rolls into one of the deleted cells.

    There is an easy solution, don't spawn want I want to spawn if it's the 0 value, but this screws up my odds a little.

    I tried coding this a dozen different ways using the system repeat and various sub-event structures/flags with no success.

    Basically nothing works, but there should be a clean solution to this.

    ----

    I tried as a flag, for example, compare current value in the original array, if it does not equal 0, do your thing, but if it equals 0, reroll to hopefully hit another cell.

    I'm not sure this works properly within the Construct logic or if there's another solution for this.

    Is there something like Roll A Random Number As Many Times As Needed Until A Specified Condition Is Met?

    And how would one integrate that into a typical finite system repeat block (not once per tick)?

    P.S. I thought I solved this until I discovered the rare 0 values on rolls and realized what was happening.

    ---

    P.S. Here's the capx.

    http://www.darksunpictures.com/public/array2.capx

    Also, is there a cleaner way of stopping the infinite loop of system repeat w/o having to increment the flag? I tried doing it with a flip between 0/1, but it didn't work.

    It's doable doing it in this weird sequence, but gets a little annoying having to increment the flag on every copy of the block.

    Just wondering if somebody figured out a cleaner solution.

  • To someone returning to Construct 2 after several years it wasn't obvious.

    And that's an Events page, dealing with event structure.

    System-Repeat is classified as an object in the Scirra manual.

    So if someone's just returning and looks this up, a bit of transparency would've been helpful, especially when it seems counter-intuitive.

    This is before I discovered Trigger - Once, mind you.

  • I read that section a zillion times before for other things.

    "This means most system conditions do not pick any instances: they are either true or false. *If they are false the event stops running, otherwise the event continues* without the picked instances having been changed. "

    Boy, that is really buried in there.

    Unfortunately, I did not correlate the two. Maybe there should be some sort of preamble at the beginning of the System Conditions section of the manual?

    That's what naturally comes up on Google search.

  • Is System-Repeat every tick? How would I know that by reading the manual?

    "Repeat

    Simply repeat the event a given number of times. This tests any conditions following it on every repeat, and if those conditions are met also runs the actions and any sub-events on every repeat."

    https://www.scirra.com/manual/124/system-conditions

    It seems to be because it needs a condition to break the infinite loop, which is confirmed by debugger. The manual states it tests "any conditions", not that you have to have conditions to break the infinite loop. This caused me some time in testing initially because I couldn't figure out why it wasn't working and I didn't fully figure it out until I found other people's code examples and then a lot of testing.

    Unless this is some general rule which was stated at the beginning of the manual that "everything is per system tick" unless stated otherwise.

    From logic alone, one would think if you have repeat something x times, it should be repeated x times and that's it.

  • Nvm, now it shows up in debugger, maybe it was some crazy run time error.

    Err, now that I think about it, maybe I didn't know I was supposed to click on the array name on the left and maybe I just didn't notice it.

    First time using the debugger too (and everything else showed on the main screen which is I think where I was looking for it).

    Thanks very much for checking!

  • Wow, thanks guys.

    That's really funny, but yeah I thought they would be a shortcut to a zillion things.