ptbcomposer's Recent Forum Activity

  • Hmm, yes, thanks! Also, I forgot to mention. You can reset global variables to their initial value in the System events. That's the reason to make the clock text box set to a global variable.

  • Try this. Global variable for clock. Every tick set clock to "dt." This will make a consistent clock regardless of framerate. Make a text box. Every tick set text to global variable clock. I don't know how to have it show only seconds, but someone else might.

  • Use system timescale 0 and then right after set pause button only timescale to 1.

  • They should put this at the top of the Scirra website...

    "When in doubt, use global variables."

  • What I am going to do for my website is code the main page (index) in regular html (in Expression Web) and use C2 to design my menus and anything else one would normally do in flash. My music website (www.philipcomposer.com) uses old-school frames and div and a cheap-looking flash menu made in CoffeeCup Flash Menu Builder; each frame on the index links to a different html doc . I am no good with code (e.g. flash) so I'm going to use C2.

    Maybe with HTML5 we'll see a resurgence in frames and div tags. So the web crawlers will be able to find the index.html page, which is comprised of a combination of regular HTML and also HTML5.

  • I got it! The solution is to use the system "Trigger Once While True" Condition with the "Is Overlapping" event.

    Use the arrow keys to move the player around (straight down is where the enemy is).

    Here is the capx...

    http://wayofthesax.com/tests/enemy%20proximity%20fading.capx

    *pats self on back*

  • Oops, sorry about that. Damn, now I want to figure this out so I'm gonna have to do it.

  • Use 2 fade behaviors for the same enemy. Fade1 fades in however long you want and "0" fade out (tell it to not destroy on fade out); Fade2 will have "0" fade in and however long you want it to fade out (tell it also to not destroy on fade out so that the same enemy is still moving around when it's invisible). Also make an empty sprite (no image, just a blank box) and link it to the enemy (look this up in a tutorial; the box will move with the sprite); make it as big as you want for however much space you want there to be between the player and the enemy when it appears.

    For events, when the enemy is "On collision with" the blank sprite, "Start Fade1"; when the enemy is not "On Collision with" (inverted) the blank sprite, "Start Fade2".

    If you are spawning enemies when they get in proximity with the player (which is probably what you should do to keep the game running smooth), then make sure you tell Fade2 to destroy on fade out (ignoring what I said above).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, and I just tried. This works even when switching between browser tabs.

  • Hmm...I notice different results everytime I install a new version of Construct 2. Two weeks ago I was getting some weird popping sounds when I had stuff muted. Now it is fine. However, now I have to preload things that I never had to preload before and the only thing I changed was updating to a newer version of Construct 2. Maybe that is the problem?

  • I didn't know that's what you were trying to do. Sorry.

    Also, you can use that for anything you want to mute, such as ambient sounds and music. Just remember to tag everything correctly, and create a global variable for them.

  • Check this out. Make sure every sound you want to mute is tagged with the same tag (in my case it is "sfx"). Create a global variable called "SFXAudio" or "SFXMute" whatever and then follow this code...

    <img src="http://wayofthesax.com/img/mute%20button%20screenshot.png" border="0" />

    When global variable is 0, "sfx" is muted. When global variable is 1, "sfx" is unmuted. Simple. For some reason Construct 2 buttons don't work with it, so use your own as a sprite or something (in my case here it is a text box).

ptbcomposer's avatar

ptbcomposer

Member since 8 Mar, 2012

None one is following ptbcomposer yet!

Connect with ptbcomposer

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies