LukeW's Recent Forum Activity

  • lol, I'm such a dork. The answer was in my question.

    Just added a second variable which is the difference between 100 and distanceToOwner and set opactiy to that. Sure enough, it works.

  • Well, I already know how to do the first bit. I've got a shadow and it measures the distance to its owner and sets opacity according to that value. The bit I'm getting stuck on is that it's working in the reverse as to how I want it to happen. Basically, the closer the object, the darker the shadow should be, not vice versa. Added a gif to demonstrate.

    And here's the code:

    I feel like I need an expression that can take a number and flip it within a range of 100. So 3 becomes 97, 30 becomes 70 and so forth. But I don't know how to do that or if it's even feasible.

    TIA

  • Saw this in the beta and some pretty excited comments about it, but never having done much animation stuff outside of frame-by-frame stuff, I'm wondering what exactly timeline animations do and how this works in a program like C3?

    I saw "This allows you to design animations in the editor by creating sequences of tweens - for example moving an object along a path, or making some elements of the title screen appear one after another."

    And I just wonder how this is different to the current system of triggering through events or when an object reaches a certain position?

    As this is all new, there's obviously not much in the way of documentation and examples, but I'd love to hear a better explanation of what timelines are and how they work in C3 if someone feels like explaining.

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, thanks guys. I'm not sure why, but I find managing state machines in C3 to be so much more confusing than in other languages. Maybe it's related to the event sheet system, I don't know. Anyway, think I've got it all sorted now, guess once you know what the problem is, you can start looking for a better solution.

    Cheers

  • In typical fashion, I found an effective work around to this as soon as I posted all of that ^. However, it still doesn't answer my question regarding the 'trigger once' block.

    If I take all the stuff from the trigger once blocks and move the to the state that is triggering the change of condition (so exactly how I'm handling the animation changes) then it all works as intended.

    But like I said, why would those trigger once blocks not register if there is more than one instance on the screen?

    ...

    Is it because the 'trigger once' has no other condition in the same block? Surely not?

  • So for some reason, I'm really struggling with state machines in C3, specifically relating to when there are more than one instance working in a layout. I have a typical example below which, to my eyes, should work.

    Basically, each enemy has an 'enemyState' variable (which is assigned at the family level). This particular enemy is idle until having LoS to player, at which point they move to 1. During state 1, enemy flies around and starts counting down to release a burst attack. Once the burst attack is over, enemy goes back to state 1 and flies around a bit more.

    Should work fine. And it does, until a second bat instance enters state 1. At this point, the bats will move between states but not run any lines that are inside the 'trigger once' blocks. In the past, I had my set animation lines in there until realising that they weren't being activated unless I moved them out.

    Logically, I can't see why this works when there is one instance in play, but breaks as soon as a second one enters. Surely the condition is selecting the correct instance that is triggering the state machine? I thought that maybe I needed a 'for each' block in there, but that made no difference whatsoever, whether I put the 'for' block in each state condition, or make one parent 'for' block and have all the state conditions to be sub-events of it, makes no difference.

    So either I'm missing something very obvious or I don't know what. But I'd love a bit of help on this one just to stop me making similar mistakes in the future.

    Cheers

  • Alright, this happened again today and I was able to isolate what causes it.

    Turns out that if you have instances through your project that are on different layers in separate layouts, changing their layers to be the same actually moves what layout they're on.

    This is the reason why I was able to break some of my levels without ever actually opening them up (thought I was going crazy).

    Anyway, I recreated it in a separate project and uploaded it to the bugs github, so maybe it'll get fixed. At least I know not to change what layer an object resides on from the project bar.

    github.com/Scirra/Construct-3-bugs/issues/2523

  • Hi,

    Was wondering, when it comes to placing tiles, whether in the editor or through Tiled, you can rotate and flip on the x/y axis. This is pretty convenient for getting tiles to fir quickly in a level.

    But my question is, is there any sort of performance overhead doing this, or any other reason not to do this?

    Cheers

  • Yeah, I think I managed to have them selected at the master level and moved them to my global, non-scrolling HUD layer. I have nfi how or when I did this, but I fixed it by going to an older save that had all the correct instances and just selected all and pasted them into the newer version.

    All fixed. I gotta be more careful.

    Is there a way to permanently lock a specfic layer so no new instances can be added? Even with it locked, I'm always adding things to that damn HUD layer by mistake.

  • okay, so a bit of a wtf moment.

    As I was going through re-adding them to each layout, I opened up one particular layout which I haven't had opened for a while. All the enemy instance types have been moved to this layout. Even more frustrating, more of the other instances in that layout have been moved to different layouts.

    I think I'm going to have to bite the bullet on this one and revert to an older save. This is too much.

  • Hi

    Managed to delete every instance of a certain enemy from every layout and have no idea how I managed to do this or when (only just noticed they were all gone).

    In the interests of making sure I don't do this again (and preserving my sanity), would someone like to comment on what I did wrong exactly? At first I thought I must have deleted it from the project bar, but it's still there. Just all instances are gone from layouts and will need to be re-added manually. I don't even remember when I worked on that object last. Guess I must have pressed something while I had them selected at the master level.

    Cheers

LukeW's avatar

LukeW

Member since 26 Mar, 2017

Twitter
LukeW has 9 followers

Trophy Case

  • 7-Year Club
  • Forum Contributor Made 100 posts in the forums
  • 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

12/44
How to earn trophies