Aquanex2's Recent Forum Activity

  • this is a misunderstanding.

    The persistent behavior keeps the properties for objects when returning to the layout where they were placed or created.

    A global layer has the same objects on every layout, but the deafult properties.

    If you want to take an object from layout to layout and keep its properties, you need to place it on an normal layer and enable 'Global' for the object. Another option is to save all properties in an global object like an array or dictionary. You do not have to create any real entries there, but you can also create instance variables and store values like health, exp, strength etc.

    I Totally forgot you could make an object global. I considered an array, as it's for unlockables so it would work better, but arrays confuse me so I didn't. Thanks!

  • So I have an object that has the Persist behaviour. It also is on a Global Layer. There seems to be an issue when I load another Layout that has the Global Layer. The object's properties are reset, but I thought the whole point of Persist was to prevent this?

    If you go to another Layout with the overridden layer, the Persisting object doesn't keep it's properties from the other Layout, and instead resets them. Interestingly, if you go back to the previous layout, the properties will be as you left them.

    What I want is for the object to keep it's properties, as well as Persist Behaviour, without resetting them when going to a new Layout that uses the Global Layer. I need the Persist Behaviour so that the objects don't reset their properties.

  • I had a backup that works just fine, but I'm not sure what happened! All is well now! If anyone has any clue as to what may have happened, give me a holler!

  • I tried to open my game, but I receive a message box that says "Failes to load .capx. Folder to unzip does not exist. C:\users\aquan\AppData\Local\Temp\capNA6HX3\

    I don't know what to do! Help! Please!

  • Thanks a bunch, I tried it with one object before, but couldn't get it to work. I'll see if this works!

    It's actually been working totally fine for months, then all of a sudden stops working, when no code interferes with it.

  • I have two objects. One called FadeIn, and the other FadeOut. These objects are meant to be used as a screen transition. When you click on a level from the level select for example, it will fade to black, go to the level, then fade out to the level. When it gets to the level you can't see anything because the FadeIn gets stuck, not turning invisible or being destroyed, even tho I set the behaviour to destroy it.

    They are supposed to be destroyed after they fade out, but don't. Then I set it to turn invisible after it fades out instead, but doesn't. Any guesses? I have no clue.

  • I'm trying to use the continuous preview but it's bringing up an old continuous run of the game. I keep trying but it's not working. It just keeps bringing up my old run.

    Help Please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • http://www.blackhornettechnologies.com/Construct2Stuff/aqunex2_musicfade_bht.capx

    Ahhhh... I see... My mistake was I wasn't setting the volume every time I subtract from the dB.

  • Sounds like you are replaying the music each time with a lower volume, rather than using "Set volume" with a tag.

    Nope. Here's a picture of my code.

    https://www.dropbox.com/s/urgp0f9rtat9n ... s.png?dl=0

    The only other code related to the music is when you you finish a level, or pause the game, the music stops, which I checked to make sure that they weren't overlapping. They are not.

  • Yeah, you would need to explain the issues. I am still on Construct 2, but it should work the same way. Always worked without issues for me.

    The audio starts to gargle the moment I issue the command. The volume still fades out, but the audio gargles.

  • create a global variable called musicVol and set it to 0 or whatever the volume is supposed to be ( goes from 0 decibels to -infinity I guess )

    create another variable called fade = 0

    have an event that sets music volume to the value of this global variable

    Then on your command set fade variable to 1

    create another event: if fade = 1 > every 0.1 seconds subtract 1 from musicVol variable. That would reduce music volume by 10 decibels per second, need it to fade faster set it to subtract 1 every 0.05 seconds or whatever fits your game.

    I would also put some limits here. if musicVol<-100 set fade to 0 again so it stops fading because you can't hear anything at -100 anyway.

    You can also bring it back up again, same way, just set fade = 2 and add event that if fade = 2 ads 1 to musicVol every 0.05 seconds, and if musicVol>than 0 and fade = 2 set fade back to 0 and musicVol back to 0, so it stops at 0 decibels

    I did something like this before posting this, and I was having audio issues. What do you think the cause of this is?

  • I want to make music fade out on command. How do I go about doing this. Any help will be appreciated!

Aquanex2's avatar

Aquanex2

Member since 19 Nov, 2014

None one is following Aquanex2 yet!

Connect with Aquanex2

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies