Fengist's Recent Forum Activity

  • Also, keep in mind that anything you have set to global is created for the duration of the game once it is created unless you specifically destroy it.

    For example. Drop a button and a text on a layout. Create another layout and drag the same button and text onto it. Have the button on layout 1 go to layout 2 and have the button on layout 2 go to layout 1.

    If you run it in the debugger, and expand the trace for the text object, you'll see that when you click the button to switch layouts, it creates an 'instance' of the text for each layout and destroys it when you switch layouts so that only one instance of the text exists at any one time even though you have it on 2 layouts.

    If you set that text to global though, it still creates a new instance when you switch layouts but doesn't destroy the one from the previous layout so you end up with two instances, just different UID's.

  • He's saying if you don't want to host your own file/site, use example.com as the url. And don't use the ajax post or get, use the head call, which I'd agree with.

    The problem I have with any site or domain other than your own, you can't guarantee that they'll always be there.

    As far as the tcp, I assume he means websockets. If c3 or c2 has some way of sending tcp/udp packets without writing JS, I'd love to know about it.

  • For that, your best bet is to likely start another topic and post a c3p file. I can think of a hundred things that would keep text from displaying.

  • Hi Fengist,

    I'm using tags, but the audio effect still plays. I'm wondering if I need to include an event connected to clicking the Left mouse button as that's what triggers the sound but I'm not sure how to do this.

    In some way, whether it's through the variable Mario suggested or through a mouse click, you'll need some event that turns it off. And once you do, make sure there's nothing else that will trigger it starting again. The Audio.Stop All should stop all sounds from playing regardless of the tag.

    Here's an example of how I'm using a mouse click on a sprite event to start music playing. Stopping it is done the same way.

    + Mouse: On Left button Clicked on NewGameButton
    + System: [X] Is ChoiceMade
    -> Functions: Call PlayEffect (Name: "UI_Quirky30")
    

    You'll notice that calls a function. One of the things I do to help keep things organized is to create an entire event sheet just to handle audio events and include it in any other event sheet that needs to play audio. That way I just call a function to play music or sound and pass the file name. If I need to adjust things or change the way all audio is played, I can change the function without having to find every single event where I play audio.

  • You are playing the sound every tick - looks like if Mario is in the air, you play the sound. Just play on the jump. (Or you can probably add 'Trigger once while true' to your condition.)

    Didn't notice that. That would definitely add some strange effects to the sound.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One of the tricks I use is that all music is played with the tag "background." All effects are played with the tag "effects." Whenever I need to stop one, I can audio.stop("effects").

    Are you using tags?

  • Fengist Dude, that was so rude of me, It didn't come out right and I didn't get a chance to edit when I got banned. I'm sorry, I misread.

    Apology accepted. Don't ever make me throw Monty Python at you again.

  • Eric Matyas is a local hero who has a huge collection of sound effects and music you can play with. Just to confirm that it may be in the conversion, go to his website, pick a sound file and test it.

    His thread is here:

    construct.net/en/forum/game-development/tools-and-resources-27/building-library-images-120828/page-8

    soundimage.org

  • Making a farce like that seems to just show ignorance.

    Oh, and if making a farce shows ignorance then the guys at Scirra should truly appreciate the humor in it.

    media.giphy.com/media/7cAGURf0zN2Bq/giphy.gif

  • The X & Y are inverted due to how early computer monitors work, so that's normal. Making a farce like that seems to just show ignorance.

    I've been writing code in one language or another since 1979 and I have never seen the x,y inverted on anything. X has always been the columns and y has always been the rows. So if I'm ignorant, I've been blissfully so for 40 years.

  • I've also popped a few neurons trying to decipher the debug output from 3D arrays.

    Ashley maybe it would make things a little bit more readable if the z layers were bracketed?

    Fengist's x=0 would then look like:

    (370,-1,-1,-1),(222,-1,-1,-1),(913,-1,-1,-1)...

    ...which is a lot easier to parse.

    That would have at least made me stop and realize it wasn't an x,y,z representation. I was working with hundreds of cells and didn't stop to count them so it never occured to me that it would be anything but x,y,z. Thank god it wasn't a 200x200x200 array, I would have lost my mind trying to figure out which was which.

  • Real simple setup. 10x10x4 array. Clear the array to -1 The test, loop through the x and y for the array, set the x,y on z=0 to a random number.

    + System: On start of layout
    -> Array: Clear to -1
    ----+ System: For "X" from 0 to 9
    --------+ System: For "Y" from 0 to 9
    ---------> Array: Set value at (LoopIndex("X"), LoopIndex("Y"), 0) to round(random(1,1000))
    

    and this is what debug showed me

    I kept thinking, "What the hell? It's skipping over the cells like it has a 'step 4' in the loop" Took me several hours (working with a much larger array, turning function bits on and off mind you) to realized what a jumbled mess that watch output is. It's not the x,y of the 0 layer like I expected. It's the y,z of the x row. What the??? Look guys, I know you Brits do things differently like driving on the wrong side of the road. But seriously, when you go to a museum, do you stand in FRONT of the painting or do you hug the wall and look at the edge of the frame (don't answer that, the dry British humor of an answer will escape me)? Because we Yanks are very x,y,z spatially oriented. Hell, we're even alphabetically oriented that way. That y,z,x thing, man, that's like... driving on the wrong side of the road.

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies