Search Unity

Jewel Match Framework

Discussion in 'Assets and Asset Store' started by kurayami88, Aug 30, 2013.

  1. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Sorry couldn't do it, but however I did make a timer go up but not countdown, so when the timer reaches 2:00 (120 seconds) from starting at 00:00 then it ends the game which is not what I want.
     
  2. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    how did u code your timer to count up?
     
  3. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I had put:

    string minutes = Mathf.Floor(timeKeeper / 60).ToString("00");
    string seconds = (timeKeeper % 60).ToString("00");

    Just under if(isTimerGame)

    and under if ((TimeGiven - timeKeeper) >= 0.0f)

    I had put:

    timeText.text = minutes + ":" + seconds;

    and under else I had put:

    timeKeeper = 0.0f;

    If I put
    timeKeeper -= Time.deltaTime * TimeGiven;

    in the IEnumerator timer()
    It would only do minus in front of the number
     
  4. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    pls undo your changes to the original code so far... then try..

    // declare variable
    string minutes;
    string seconds;

    // in isTimerGame logic loop
    minutes = Mathf.Floor( (TimeGiven - timeKeeper) / 60).ToString("00");
    seconds = ((TimeGiven - timeKeeper) % 60).ToString("00");
    timeText.text = minutes + ":" + seconds;
     
  5. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Thank you so much it really works.

    Was also wondering does the booster asset still work because was thinking of buying, I took a chance to see if jewel match pro works in unity version 2018 and it does.
     
  6. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,

    I believe all assets should be working as it was coded in a very universal structure. It does not depend on any specific requirements / assets and as long as unity2D function is still available, it would work.

    Rest assured, if you have bought and found it not working, I'll be happy to process any refunds.
     
  7. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Thank you for getting back to me that was quick.

    Sorry another question how would I do a progress bar based upon the score. I did try it in the updatestatus of the winning conditions script and it did work but because its in the update section it just goes slowly up.

    I have in the updatestatus

    if (currentValue < gm.score)
    {
    currentValue += gm.score * Time.deltaTime;

    }


    LoadingBar.fillAmount = currentValue / 100;
     
  8. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,

    I have no idea why are you using Time.deltaTime...
    what you need is the current score value (which you have "gm.score") and a total value....

    as usual, undo your current changes...
    then try this..

    // under the updateStatus()
    // use the type of bar depending on the type of progress you want (choose one only)

    // bar of min score
    LoadingBar.fillAmount = (gm.score / (float) scoreToReach) * 100;

    // bar of max score
    LoadingBar.fillAmount = (gm.score / (float) scoreMilestone3 ) * 100;


    ==========================
    NOTE : Please make use of the available variables provided.... the framework I provided has quite the complete set of variables for you to pull out any info that you may require.
     
  9. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Ok thank you I'm also just trying to get a hang of code. I saw a tutorial for a loading bar though that uses Time.deltaTime. What I was trying to achieve is a star progress system. I think the stars maybe easy but had trouble with a progress bar. I also changed to a slider bar because that has a min and max value but have notice I had to fiddle around with the max number though.
     
  10. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I bought the add on booster pack but it doesn't work at all. Not even the examples work. It needs updating. I tried it also in version unity 5 but still doesn't work.
     
  11. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    did you place it in the same project?
    what is the error you are getting?
     
  12. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Its no
    Its not a proper error I get, but the example scene won't work. Its hard to explain. But here is a image to show you what I mean. This is in a completely clean scene with Jewel Match Pro and the booster addon. There is no other assets in project at all. When I tried it in a jewel match pro demo and click on a booster button nothing happens. Whats showing is the booster demo scene.
     

    Attached Files:

  13. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Hi,
    from the screenshot you provided, the match engine (gameManager & related scripts) could not be found.
    As I said earlier, did you make sure you extracted the add-on to the "same" project as your JMF?
     
  14. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Sorry been out of action for awhile. Like I said in my last post I did a clean project and imported JMF PRO then imported the booster add on. The booster add on doesn't work.
     
  15. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    welcome back~
    Well I can't further diagnose it remotely... so if you still can't get it working, i'll be happy to assist you on processing your refund.
     
  16. miguelandrade

    miguelandrade

    Joined:
    Feb 28, 2015
    Posts:
    22
    Hi Kurayami88

    Using this in my code:

    Code (csharp):
    1.  
    2. void Start () {
    3.         gm = GetComponent<GameManager>();
    4.         // if you renamed game objects, revise the changes below...
    5.         ap = GameObject.Find("GameManagerPanel").GetComponent<AudioPlayer>();
    6.  

    Code (csharp):
    1.  
    2.         if(GUI.Button(new Rect(20,220,80,20), "Cancel Music")) {
    3.    
    4.              
    5.                 ap.player.volume = 1.0f; // soundFX audio controller
    6.                 ap.bgmPlayer.volume = 0.0f; // bgm audio controller
    7.              
    8.              
    9.             }
    10.             if(GUI.Button(new Rect(20,240,80,20), "Cancel SoundFX")) {
    11.  
    12.              
    13.                 ap.player.volume = 0.0f; // soundFX audio controller
    14.                 ap.bgmPlayer.volume = 1.0f; // bgm audio controller
    15.              
    16.              
    17.             }
    18.  
    19.  
    The Button Cancel Music... cancel all the sound... the music and sound effect...

    When I click Cancel SoundFX button.... all the sound is activated... the music and sound effect...

    How to solve?

    For the first button I want to enable just the music... for the second button just the sound effect...

    Thanks
     
  17. miguelandrade

    miguelandrade

    Joined:
    Feb 28, 2015
    Posts:
    22
    So....

    What I'm using here...

    With this Code, I can turn on sound fx:
    Code (csharp):
    1.  
    2. if(GUI.Button(new Rect(20,220,80,20), "Enable FX")) {
    3.              
    4.             ap.enableSoundFX = true;
    5.          
    6.              
    7.              
    8.             }
    9.  
    With this Code, I can turn off sound fx:
    Code (csharp):
    1.  
    2. if(GUI.Button(new Rect(20,240,80,20), "Enable FX")) {
    3.              
    4.             ap.enableSoundFX = False;
    5.          
    6.              
    7.              
    8.             }
    9.  
    With this Code, I can turn off music:
    Code (csharp):
    1.  
    2.  
    3.     if(GUI.Button(new Rect(20,260,80,20), "Cancel music")) {
    4.      
    5.                  
    6.                 ap.enableMusic = false;
    7.                 ap.bgmPlayer.Stop();
    8.              
    9.              
    10.             }
    11.  
    12.  
    With this Code, I can turn on music:

    Code (csharp):
    1.  
    2.  
    3.  
    4.     if(GUI.Button(new Rect(20,280,80,20), "enable music")) {
    5.        
    6.              
    7.              
    8.                 ap.enableMusic = true;
    9.              
    10.              
    11.             }
    12.  
    13.  
    With this variable below I can Turn off all music and SFX in background:
    ap.bgmPlayer.audio.volume = 0.0f;

    With this variable below I can Turn on all music and SFX in background:
    ap.bgmPlayer.audio.volume = 1.0f;

    My question is.. how to increase and decrease all sfx volume in the game?it's possible?

    I want to control SFX with one variable and Music with other variable...
    Its possible?

    Thanks
     
  18. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493

    solution already provided earlier...
    if within the FXToggle.cs script :
    ap.player.volume = x; // soundFX audio controller
    ap.bgmPlayer.volume = x; // bgm audio controller
    where x is the volume you want from range 0.0 ~ 1.0

    if within the audioPlayer.cs
    directly access the player / bgmplayer
    player.volume = x; // soundFX audio controller
    bgmPlayer.volume = x; // bgm audio controller


    I actually placed a very basic sound & music toggle in my framework... The control script is "FXToggle.cs" located at '\Scripts\area 51\GUI related'

    within it, you may check how I triggered the audio player... or you may even reuse/modify the script i made...
    NOTE: the "FXTracker.cs" is use in conjunction with the "FXToggle.cs" and controlled via drag and drop on the unity inspector.

    All the gameObject relevant to the sound/audio is located in my sample framework placed under the "Anchor Bottom Left".
    It contains the AudioSource for both the bgm/sfx as well as their trigger script

    ---------------
    however, the editable inspector settings for the audio is on the "AudioPlayer.cs" located alongside the GameManagerPanel and its scripts. The path is located at "\Scripts\customisables"

    AudioPlayer has already pre-assigned the AudioSource mentioned earlier.
     
  19. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Doesn't this work anymore because I get poolmanager errors and it does say poolmanager is optional. I am using unity 2018.3.6 if that helps.
     
  20. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I reverted back to 2018.1 and then it worked.
     
  21. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    When it is a "is gets type game" how do the sprites get spawned. Because I want the sprites not align to the left but align in a straight line.
     
  22. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    Please view the next response post for the fix... tq
    ------------------------ OLD MSG -----------------
    im not sure if there are any major changes to how it handles the compilation of codes in the newest version. If you are adept in unity debugging, u can easily follow the step on what is missing and disable it / blank it.

    FYI, the poolManager is optional.. the package includes an empty shell of the poolManager asset which can be easily replaced if you bought and imported the original poolManager asset files.

    If the empty shell is causing a code compile error due to the new version, as I said, u can try and fix the empty shell code.

    =========================
    also, this package was coded when monoDevelop is still the primary editor.
    it could be because unity has deprecated monoDevelop, there might be some scripts with monoDevelop coding that is unable to be compiled by the current editor.

    in which case.... the only option would be to:-
    A) strip the poolManager code
    B) update the shell with the latest official code of poolManager.
    C) install the last known monoDevelop editor to the new Unity.

    I hope none of the JMFP / JSF codes are affected as I took the initiative to made the code universally compatible to any editor and platform.

    there is a file that it is hardcoded in.
    the script file involved is the WinningConditions.cs script located in "Assets\JMF PRO\Scripts\customisables"

    the function responsible is "setUpTypes()".
    from there you can see there are codes that is already labelled and tells you it is adding to the down direction.
    new Vector3 (1,-(count*3+3),0);
    just change this to :
    new Vector3 ((count*3+3),1,0); might do the trick?
     
    Last edited: Apr 19, 2019
  23. kurayami88

    kurayami88

    Joined:
    Aug 30, 2013
    Posts:
    493
    pls replace the SpawnPool.cs script with this attachment. tq
    location of the file in the project is at
    Assets\Plugins\PathologicalGames\PoolManager

    **FYI, this is still the same 'shell/dummy' script of the original poolManager with a few more functions disabled.

    ==========
    if you are still getting a compile error.... i would advice to empty out your project and reimport JMFP/JSF, and then replace the SpawnPool.cs script.

    So far i tested working on my end.

    ===================

    extra notes : it seems quite a few things are deprecated since this last few years. But none that are critical enough so the core game still functions as it is suppose to.
    just ignore the initial compile warnings and it should be good to go after.
     

    Attached Files:

  24. NeoUnity

    NeoUnity

    Joined:
    Sep 4, 2013
    Posts:
    156
    It works well on Unity 2020.
    But it has 3 error-messages about "Handles.SphereCap".
    Then, the errors disappear when they are changed "Handles.SphereCap" to "Handles.SphereHandleCap"
     
    Last edited: Apr 23, 2021