megatronx's Recent Forum Activity

  • Cool, thanks for sharing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cool! How did you do the water?! It looks great!

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Hi,

    I would like to request additional action to input plugins, that will cancel current input. It came to me just today, when I've made a scrollable map. Basically the issue there is, that if I hold down directional keys ( responsible for player movement) while pressing map button, on map appearance it instantly scrolls it ( as the same keys are responsible for it's scroll ). I have tried using currently available conditions, and have build a massive wall of those, to try and break the input, but it just couldn't cut it. So I'd like to request that kb, mouse and controller plugins have new action, called "Brake input" or even more appropriately "Force release" . I assume this could also have other uses, when you hit a wall for example you want instance to stop and require you to hold the key again. Or charging a power strike, but being interrupted by enemy.

    Here's the capx https://drive.google.com/file/d/0B0jUjWN7LcQhY2tNRU9aNnJLX2M/view?usp=sharing

    Arrow keys for moving player and scrolling map, "M" key to open/close map. Check it out!

    Thx!

  • I think my capx were missing... however I made a quick sample based from blend modes sample

    https://dl.dropboxusercontent.com/u/762 ... ssues.capx

    Notice fps can be affected and some blend effects don't require force texture.

    For some reasons, I remeber i add modal window which is using force texture, when they are destroyed (no blend effects now) and goes to map screen, it bothers FPS because Texture own layer is active and it cannot be turned off.

    Maybe isn't 100% explanation, but do it what the developers need it due that they cannot modify C2 editor.

    I've added browser object, and run it in full screen 1080, and on both layouts i had cpu:1% and 60fps, very shortly after layout started, but I have pretty beefy rig ( specs in description )

  • i just made a quick example to test how it behaves in r203 and most times it works fine... but not always. There are 10 instances of Sprite and from time to time

    "On Timer "go"" will not trigger for random sprite. It will just move in one direction and timer is not present/visible in debugger.

    Maybe sometimes random selects 0?

    I just added timer to my new events, For each of course, and it's working fine. Basically created boolean Wait, that goes true after triggering timer. More hustle. There should be conditions really. I don't really remember how I used to set up timers in the past, but they seam to work fine without "On Timer" and without extra variable. But hey, anyway, it works now, at least in my ocd setup.

  • > You all say this should work, and I also thought so, and it did for a bit, then started slowly dropping characters one by one.

    >

    So it is fair to assume that you just messed up your code.

    Since the examples of code that were provided in this topic do work as intended.

    Yeah, it's possible.

  • Here is a capx that seems to do what Megatronx described in his post on top of that page.

    No bug as far as I can tell, everything is working as intended.

    And obviously, you can't "set a timer in a for each loop". "On timer" is a trigger. It will be the event triggered first. You can't run a "for each" loop every tick and have it recognize a trigger event inside it. That's not how events work, and it's not specific to the Timer behavior.

    And no need to add a for each loop under it either, C2 does it internally (proof in my capx when you see the three workers you've created on the same tick moving away at the same time).

    It all sounds as unproper events rather than actual bugs in C2 itself. Without a capx to look into though, no way to tell for sure.

    Also if you try something like different tag names relying on the UID of the objects, it is just bad design on your part I'm afraid.

    It obviously can't work, since, as mentioned, you would indeed need to loop through each instance to get its UID, and it can't work with the trigger system.

    It's also, not required.

    Don't have beta installed, otherwise would check the capx.

    Originally I had system like this:

    For Each "Dude"

    |State="A"

    || Distance between dude and his current target less/equal X

    || - Change State to "B"

    || - set Timer "Time" to Seconds

    ||Else

    || - Do Stuff, walk towards target etc

    On Timer "Time" : Call functions, Change Target, Set state to "A"

    Everything else I did later on, all the changes, those were just an act of desperation. You all say this should work, and I also thought so, and it did for a bit, then started slowly dropping characters one by one.

  • So to conclude:

    Setting timer within For Each loop doesn't work.

    Timer trigger only works with strings, and doesn't work with changing variable, scaling functions and such.

    Right?

    saiyadjin thanks, I'll use Wait for current events.

  • You do not have permission to view this post

megatronx's avatar

megatronx

Member since 25 Sep, 2008

Twitter
megatronx has 1 followers

Connect with megatronx

Trophy Case

  • 16-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
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

23/44
How to earn trophies