farflamex's Recent Forum Activity

  • I can see the wisdom of that approach, I can see times when the extra control would be useful, and you can never have too much control :)

    On the other hand, a simple command to combine everything might be useful if it was possible, something like a 'Is showing' which combines everything to determine if the object is actually showing at that time.

  • Is this correct? If I make a layer invisible, and then do a count of visible objects which are on that layer, it still reports that all of the objects are visible, even though they're not. Does the fact that they're on an invisible layer not set them as invisible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you do this? My game looks excellent in crop-mode and full-screen and I've done the calculations to allow the screen to change size, but it runs very poorly on older hardware and needs to be run in a smaller screen-size, set at 800x600, which requires me to change the 'Fullscreen in browser' mode, with an option in the game or something. Can you change that setting during run-time?

    I know I can change from windowed to full-screen with the browser object, but I don't see a way to change the project properties.

  • I think I'm right in saying that you can calculate it by the collision angle minus your facing angle. I think that works. If the collision hits you at 90 degrees (from below) and you're facing 180 degrees (left), then the hit came at 90 - 180 = -90 (converts to 270), which is your left, which is correct.

    If the collision came from above (270 degrees) and you were facing left (180), then the angle would be 270 - 180 = 90, which is your right.

    That works for my case at least, hope it helps :)

  • Thanks, I'd never have worked this out on my own :)

  • Is there a way to do this? I want to always show 1 decimal point after my number, including when it's 1.0 for example. I know I can do Int(Number*10)/10 to get 1.1, 1.2 etc, which limits it to 1 decimal point only but if the original number was 1.0, it'll just return '1' as the answer.

    So for 1 I want to show 1.0

    For 1.1 I want to show 1.1

  • Ah of course, that's perfect because it tests either way. I only want the click to register if the fade is complete in either direction (i.e totally opaque or invisible), so I can just test for any mid-range opacity. Only just noticed you can test for opacity, thanks :)

  • Well it couldn't be much easier than opening a webpage right? Just export your game, and upload it to a webpage somewhere. I think I'm right in saying that you can use your dropbox space.

  • Is there a way to know when an object is currently fading in or out? I know I can catch it when the fade is complete (only fade out, not in?), but I'd like to know when it's in mid-fade.

    When I click a certain object, I want another object to either fade in or out. It works ok, but if you click again before the first fade is finished, it keeps restarting which doesn't look very good. I'd like to wait for the fade to finish before another click is allowed. I know you can catch when a fade out is finished, but not fade in apparently. If you could catch fade in finished, then I could set a boolean to true when the object is clicked and then set it to false when the fade finishes. But I can't do that because I don't know how to work out when fade in has completed.

  • Not sure if Construct 2 has a built-in method for this, or if there's an easy mathematical approach... if an item is rotated and it's hit by another object, how can I calculate which part of the object is hit? I know I can work out the angle between the two objects, but if the main object (i.e my player ship) is rotated, how can I tell which part is hit (e.g the left wing, the right wing, the cockpit etc)?

  • Ah HAH, you've hit the nail on the head, that's exactly what was happening. I couldn't tell because they all started off clumped ontop of each other, and they were all showing the final frame... since one of them (tpyical, the final, i.e TOP one) was SUPPOSED to show the final frame I couldn't see the others animating.

    Good job mate, thanks for the help :)

  • This might be something to do with the fact that all of this is happening inside an 'On Created' event in the first place.

    What happens is, when my ship is created, it hops to the 'On created' code for the ship, which then creates an icon to accompany it. So the code above is itself inside the ships 'On created' code.

    So the ship is created, it then creates the icon, it then sets a variable to the UID of the icon, so that they stay together and then, finally, it attempts to set the icon to an animation frame, as indicated by a variable in the newly created ship. That final part is the part which doesn't work, the rest works perfectly.

    So what I have is.

    Ship : On created : System Create 'Icon' (works)

                        Set ship variable to the new icon's UID (works)

                        Set the icon's frame to a variable which is entered in that ship-type in the editor (doesn't work).

    If I remove that third line and put it into a 'System : Each tick' event, it then works fine. Meaning that the code to set the animation from the ship's variable is ok, it just won't do it during the creation process of the ship. It's as if the variable isn't assigned until after the 'On create' or something.

    I am aware of course that the code would hop out to do an extra 'On create' for the icon, except in this case, I have no code for that. Not sure if the system hops out to do it's own internal stuff, but it hops back in and completes the 2nd line with no problems, just not the third line.

farflamex's avatar

farflamex

Member since 7 Oct, 2012

Twitter
farflamex has 15 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies