Search Unity

2D Infinite Runner Toolkit

Discussion in 'Assets and Asset Store' started by Dreeka, Jun 9, 2013.

  1. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @lullaharsh
    There are no plans to add the ability to do in app purchases, however, you can integrate any third party one.
    The save manager is a static class, so it is not attached to gameobjects. You can open it directly from the scripts folder.

    @paliopolis
    I have not received an email with 3 questions. Can you please resend it?
     
  2. paliopolis

    paliopolis

    Joined:
    Aug 1, 2014
    Posts:
    5
    @Dreeka
    Just send you the email again at the email address that you have in the documentation.
     
  3. Greegan75

    Greegan75

    Joined:
    Jul 11, 2013
    Posts:
    6
    Hi Dreeka, I need your help :)
    I have updated the toolkit to version 2.3 with 4.6 UI ... very cool! I have modified the AudioManager to have the number of audiosource what I need..and works!
    I added to the buttons sfx sound of the click, but I have not understand how to add audio to the notification panel of missions. With version 2.2 I succeeded, but with the new UI 4.6, I have some difficulty.

    I want the screen shows the completed mission you activate a sound, but do not know how to do with this new management UI in 4.6
    Thank you
     
  4. drswoboda

    drswoboda

    Joined:
    Nov 2, 2012
    Posts:
    18
    Hi Dreeka,

    Thanks for the updated toolkit.

    I was hoping that you could give us a list of the scripts that changed with the UI updates. This would help ease the transition to the new code, in a currently in progress project.

    Thanks again,
    -David
     
  5. Ghostfrog

    Ghostfrog

    Joined:
    Feb 17, 2014
    Posts:
    10
    Hey there Dreeka (or anyone who can help with this)!
    I'm the one who had a huge issue because the update was installed and it ruined my previous build and such.
    Anyways, I'm still working on it but I have a question and anyone who would like to try and help me, please bear in mind I'm still VERY new to this whole game building thing.
    The issue 'm having at the moment is that I cannot get the game to start when I touch the screen. Whether I test it on Unity or on my iPhone does not seem to matter as neither of them work.
    Any help is appreciated!
    Thanks!
    -Ghost
     
  6. DenisFernandes

    DenisFernandes

    Joined:
    Apr 16, 2014
    Posts:
    12
    Hi again Dreeka, i noticed that "best distance sign" isn't working, even on your webplayer..
    also in my computer i can't view the amount of coins on the shop menu.

    I have changed the power-ups position to the middle-left anchor point, but, how i can change the animation, showing the buttons from left to right? i've tried to change the animations but can't figure out how.
     
  7. John-Sandrey

    John-Sandrey

    Joined:
    Jul 2, 2012
    Posts:
    119
    Looking good but can you check yours to make sure the high score is being saved? not saving the high score on my end.
     
  8. Greegan75

    Greegan75

    Joined:
    Jul 11, 2013
    Posts:
    6
    The update 2.3 dont works in Android.
    I installed it, but the game dont start, instead it works with version 2.2
     
  9. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    First of all, I wish you all a really happy and peaceful christmas! :)

    @Greegan75
    Put your audio play command to the GUIManager -> ShowMissionComplete function.

    @drswoboda
    Will give you a list tomorrow!

    @John Sandrey @DenisFernandes
    It looks like I did not notice that bug. Thanks for reporting it. Will post a fix tomorrow.

    @Ghostfrog @Greegan75
    The kit works fine on my mobile, so I dont know what causes the problem. I will look into the issue tomorrow.
     
    DenisFernandes likes this.
  10. DenisFernandes

    DenisFernandes

    Joined:
    Apr 16, 2014
    Posts:
    12
    Hey @Dreeka , can you please help me with my question?

    "I have changed the power-ups position to the middle-left anchor point, but, how i can change the animation, showing the buttons from left to right? i've tried to change the animations but can't figure out how."

    Wish you'all a great new year!
     
  11. Greegan75

    Greegan75

    Joined:
    Jul 11, 2013
    Posts:
    6
    After upload to 2.3 I have problem with my MOD.
    My mobile Android that use only for test operation, now my app don't works...
    Please send me version 2.2
    Thank you
     
  12. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @DenisFernandes
    Select one of the powerup, place it in the designated hidden position, and go to the animation view. If it is not open, you can open it from View -> Animation (or by pressing ctrl + 6). In the animation view, select the Powerup Button Visible clip. It should has 1 property for the y position. Right click on it, and remove it. Then press the record button (top left, with red circle), go to scene view, and move the button to the visible position. Then go back to the animation view, and press the record button again. Then change to the powerup button hidden clip, press the record button again, move the button slightly on an axis, then move it back. Finally, click the record button again, and you are done. It is enough to change 1 button, because all 4 uses the same animator. Image

    @John Sandrey @DenisFernandes
    Here is a solution for the best distance sign:
    Open the GUI Manager, and create a new variable:
    Code (CSharp):
    1. public TextMesh hangarDistanceText;
    Then assign the following line to the Start function:
    Code (CSharp):
    1. hangarDistanceText.text = SaveManager.bestDistance + " M";
    Then in the ShowFinishMenu() function, change this
    Code (CSharp):
    1. SaveManager.coinAmmount += collectedCoins;
    2. SaveManager.SaveData();
    to this:
    Code (CSharp):
    1. levelManager.LevelEnded();
    2. hangarDistanceText.text = SaveManager.bestDistance + " M";
    @Ghostfrog @Greegan75
    Can you give me a little more detail? When you say you cant start the game, do you mean the app wont even open? Or do you reach the main menu, but can't start the level? Can you interact with the top menu bar?
     
    DenisFernandes likes this.
  13. Greegan75

    Greegan75

    Joined:
    Jul 11, 2013
    Posts:
    6
    My steps that I have done with the build 2.2 (rulez) and now I do the co abuild 2.3 ( don't works..)
    1- Build APK in Unity
    2- copy and paste on my mobile
    3- I start install APK
    4- APK is installed
    5- I laucnh my app installed and...
    6- Blank(black) screen and after few seconds a message: the application not responding (only with build 2.3)

    I need to release my works, send me version 2.2, I have to finish my project.
    Thank you! :)

    Last Try:
    1-Open Unity 4.6.1
    2- I make new project
    3-I import your toolkit 2.3 from Asset
    4-I switch platform from Windows to Android
    5-I add scene to build
    6-I build package original (no my mods, only your originalasset ) and copied on my desktop
    7-Copy and paste on my mobile
    8-I installed APK
    9-After installation, I start icon submarine but...
    10-Blank(black) screen and after few seconds a message: the application not responding
     
    Last edited: Dec 27, 2014
  14. Ghostfrog

    Ghostfrog

    Joined:
    Feb 17, 2014
    Posts:
    10
    So basically, the game opens and everything but touching the screen to start the game does nothing. Everything loads up but I can't start the game. However, if I load up the original C# scene provided with the kit, it starts but none of the objects appear and the distance counter freezes at 47 m. Not sure if that's related to my project not starting at all or not.
    Thanks for looking into it!
    -Ghost
     
    Last edited: Dec 29, 2014
  15. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @Greegan75
    Can you pm me your invoice number?

    @Ghostfrog
    I am going to look into the issue! Thanks for reporting it!
     
  16. Greegan75

    Greegan75

    Joined:
    Jul 11, 2013
    Posts:
    6
    Last edited: Dec 29, 2014
    DenisFernandes and paliopolis like this.
  17. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
  18. freakprince

    freakprince

    Joined:
    Apr 25, 2012
    Posts:
    63
    Dreeka, which is the line in the TorpedoLayer that makes the torped fly across the screen?
     
  19. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @freakprince
    The TorpedoLayer script inheritance from the MovingLayer script. So, you can find the moving code in the MovingLayer's Update function.
     
  20. Ghostfrog

    Ghostfrog

    Joined:
    Feb 17, 2014
    Posts:
    10
    @Dreeka
    Hope your New Year's was great!
    I was wondering if you have made any progress of some sort on the issue I brought up... Would rather know how to fix the "no response issue" rather than the freezing at 47 meters without any obstacles popping up.
    I think it's possible that the "no response issue" could be from something I've changed in the code. If you could give me some things to check that could possibly alter whether or not the game started, I'd appreciate that.
    Thanks!
    -Ghost
     
  21. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @Ghostfrog
    At first, I would suggest you to install the latest version of unity (4.6.1).
    If you still have the issue, then you could send your project to me, so I can take a look at the modifications, because I cant help, if I don't know what did you changed.
     
  22. Darsak

    Darsak

    Joined:
    Jan 7, 2015
    Posts:
    2
    @ Dereka

    Can you please guide me how can I add scroll view in this?

    Actually I want to show user a whole list of Missions. I have approx 15 no. of Missions and it is not possible to show in single window unless Scroll view.

    Can you please guide me or suggest me any other solution for this matter??
     
  23. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @Darsak
    Creating a scroll view is quite easy. You can find a short, and a long tutorial in the topic. You van also download the latest build, and you can see how I did the shop menu. Based on these references, it can be easily done in a few minutes.
     
    Darsak likes this.
  24. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    @Dreeka I'm having problem to load the missions that I make. The framework came with 15 missions, and I added another 25 missions, coping and renaming and changing values.
    It sees complete before beating all the missions.
    Thank You !
     
  25. CriamosIdeias

    CriamosIdeias

    Joined:
    Jan 18, 2015
    Posts:
    5
    Hello,
    I want to add a 3rd char, i have created the textures named submarine3 and submarine3hit, but i see that guimanager.js need some changes, please can you help with that?
     
  26. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @aendom
    Did you added their reference to the Mission Manager (found in the Missions object)?

    @CriamosIdeias
    Here are the steps you need to take:
    - Assign the textures to the player manager
    - In the save manager, create a new variable for the new skin, named "skin3Unlocked"
    - In the GUI Manager, create the following function:
    Code (JavaScript):
    1. public function BuySubmarine3(priceTag : Text)
    2.         {
    3.             //If the submarine is not yet owned
    4.             if (SaveManagerJS.skin3Unlocked == 0)
    5.             {
    6.                 //Obtain the price from the pricetag text
    7.                 var skin3Price : int = int.Parse(priceTag.text);
    8.  
    9.                 //If the player can purchase the submarine
    10.                 if (SaveManagerJS.coinAmmount - skin3Price >= 0)
    11.                 {
    12.                     //Decrease coin ammount, and unlock the green submarine
    13.                     SaveManagerJS.coinAmmount -= skin3Price;
    14.                     SaveManagerJS.skin3Unlocked = 1;
    15.                     SaveManagerJS.currentSkinID = 2;
    16.                     SaveManagerJS.SaveData();
    17.  
    18.                     ////Update the player, and the shop display
    19.                     playerManager.ChangeSkin(2);
    20.                     UpdateShopDisplay();
    21.                 }
    22.             }
    23.                 //If the player already owns the submarine
    24.             else if (SaveManagerJS.currentSkinID != 2)
    25.             {
    26.                 //Change the current skin ID
    27.                 SaveManagerJS.currentSkinID = 2;
    28.                 SaveManagerJS.SaveData();
    29.  
    30.                 //Update the player, and the shop display
    31.                 playerManager.ChangeSkin(2);
    32.                 UpdateShopDisplay();
    33.             }
    34.         }
    - Finally, create the new shop element, and assign this function to the buy button.
    Let me know if this works!
     
    cybergoogle likes this.
  27. CriamosIdeias

    CriamosIdeias

    Joined:
    Jan 18, 2015
    Posts:
    5
    It's working but doesnt update the buy button to equip texture
    can it be in here:

    //If the yellow submarine is active
    if (SaveManagerJS.currentSkinID == 0)
    {
    //Set button sprite
    shopSubmarineButtons[0].sprite = ShopSkinButtonSprites[0];

    //Set sprite for button 2
    if (SaveManagerJS.skin2Unlocked == 1)
    shopSubmarineButtons[1].sprite = ShopSkinButtonSprites[1];
    else
    shopSubmarineButtons[1].sprite = ShopSkinButtonSprites[2];

    }
    //If the green submarine is active
    else
    {
    //Set button sprites
    shopSubmarineButtons[0].sprite = ShopSkinButtonSprites[1];
    shopSubmarineButtons[1].sprite = ShopSkinButtonSprites[0];
    }
    }


    1 more thing, when i build the game the saved game data keeps on the apk build, how do i clean all saved data?
     
    Last edited: Jan 19, 2015
  28. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    @Dreeka I do not know how to add the reference to the Mission Manager.
     
  29. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    I think i just found it.
    Thank you a lot @Dreeka
     
  30. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @CriamosIdeias
    Sorry for the late reply, had to study for my last exam (at least for now).
    First, assign the third button to the shopSubmarineButtons. Then use this code:
    Code (JavaScript):
    1. var unlockedSkins = [true, SaveManagerJS.skin2Unlocked == 1, SaveManagerJS.skin3Unlocked == 1];
    2. for (var i : int = 0; i < 3; i++)
    3. {
    4.     //If this is the current skin
    5.     if (SaveManagerJS.currentSkinID == i)
    6.     {
    7.         shopSubmarineButtons[i].sprite = ShopSkinButtonSprites[0];
    8.     }
    9.     else
    10.     {
    11.         if (unlockedSkins[i])
    12.             shopSubmarineButtons[i].sprite = ShopSkinButtonSprites[1];
    13.         else
    14.             shopSubmarineButtons[i].sprite = ShopSkinButtonSprites[2];
    15.     }
    16. }
    To clear the saved stats, uncomment the 2 commented lines in the Level Manager's Start function.
     
    cybergoogle likes this.
  31. CriamosIdeias

    CriamosIdeias

    Joined:
    Jan 18, 2015
    Posts:
    5
    in what script i add that lines?
     
  32. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @CriamosIdeias
    The code you posted before, replace that with the one I posted above.
     
  33. CriamosIdeias

    CriamosIdeias

    Joined:
    Jan 18, 2015
    Posts:
    5
    not working
     
  34. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @CriamosIdeias
    Did you assigned the third shop button to the shopSubmarineButtons array in the inspector? If yes, that what is the issue?
     
  35. CriamosIdeias

    CriamosIdeias

    Joined:
    Jan 18, 2015
    Posts:
    5
    i made a duplication of shopbar6 and set the buybutton funtion to guimanagerbuysubmarine3
     
  36. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    Hi @Dreeka,
    How can I put a sprite animation for the Submarine 1, and a diferent sprite animation for Submarine 2?
    Thank you for all your help
     
  37. Artiers

    Artiers

    Joined:
    Jan 28, 2015
    Posts:
    3
    Hello,
    is it actually allowed to sell the app(s) created with the code from this toolkit?
     
  38. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    I did a work around. And now it works. But now I notice that the best distance sign" isn't working... I did the thing you said to John Sandrey and DenisFernandes. But It did not work for me.
     
  39. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @CriamosIdeias
    Have you assigned the third buy button to the shopSubmarineButtons array, in the GUI Manager's inspector?

    @Artiers
    You can sell the games/apps you create with this kit. However, you can not sell the source code in a package in the Asset Store, or in any other site/form.

    @aendom
    That solution should have worked. I am going to release a bug fix update in the weekend.
     
    aendom likes this.
  40. aendom

    aendom

    Joined:
    Oct 15, 2014
    Posts:
    9
    @Dreeka Thank you. Please tell me when this is ready to make the update.
     
  41. superbsumit

    superbsumit

    Joined:
    Jul 26, 2012
    Posts:
    3
    Hi @Dreeka,

    I am using your plugin, its great, now I am stucked on an issue, please help me with this.
    I need to use only one layer for my background, which I wanted to move slowly as the level progresses.
    I have removed third and the fourth layer from the moving bg's, and now when I replaced my bg textures in the second layer, I am not getting the desired results, I mean the bg's are not instantiated after one another, sometimes they instantiate correctly, sometimes they don't. Another thing is, the backgrounds are not stretched according to the resolutions and this is creating problems on different resolutions.
    So, could you help me with this, am I doing something wrong here?
     
  42. Yosry

    Yosry

    Joined:
    Dec 27, 2013
    Posts:
    13
    hi @Dreeka please don't forget to fix the high score save?
     
  43. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    @aendom @Yosry
    Update 2.3.1 is uploaded to the Asset Store!

    @superbsumit
    You probably need to change the Spawning Rate of the second layer (you can do it in the assigned Moving Layer script's inspector view). The background is not part of the UI, so it should not scale. Make your background as wide as it need to be for the widest aspect ratio. That way, it will work on every aspect ratio.

    Update:
    Update 2.3.1 is now available in the Asset Store
     
    Last edited: Feb 5, 2015
  44. bill2432

    bill2432

    Joined:
    Oct 6, 2014
    Posts:
    8
    Hi, my question is how can I put missions to the game I do not understand how can I load them to the game. For example I can see in the “hierarchy” the “missions” -Mission1, Mission2…. But when I press play in the game it does not load the mission1 and if I win the go to mission 2 and the to mission3…but the game show always the same goals (collect a shield,collect a power up,buy a power up) and not load the missions from hierarchy. I want to tell me how the game follow the order of the missions in hierarchy. Thank you for your time
     
  45. AW72

    AW72

    Joined:
    Mar 5, 2015
    Posts:
    5
    Hi,

    I have a problem with the kit that every once in a while it spawns a double coin. I used a new prefab for the coin, so I am able to see both coins in the game. Is there a way that I can prevent this from happening?
     
  46. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    507
    Sorry for the late reply!

    @bill2432
    Can you tell me which version of unity do you use? And do you have this issue in an unmodified project as well?

    @AW72
    The ideal solution would be to remove the duplicates from spawning, but you can limit it from code as well. In the player manager, create a new bool variable:

    Code (CSharp):
    1. private bool canCollectPowerup;
    Then, in the Update function, add the following line, before the other lines:
    Code (CSharp):
    1. canCollectPowerup = true;
    Finally, in the OnTriggerEnter2D function, modify the first part of the if segment, so it looks like the following:
    Code (CSharp):
    1. if (other.tag == "Coin")
    2.         {
    3.             if (!canCollectPowerup)
    4.                 return;
    5.  
    6.             //Notify the level manager, and disable the coin's renderer and collider
    7.             levelManager.CoinCollected(other.transform.position);
    8.             other.GetComponent<Renderer>().enabled = false;
    9.             other.GetComponent<Collider2D>().enabled = false;
    10.  
    11.             AudioManager.Instance.PlayCoinCollected();
    12.  
    13.             canCollectPowerup = false;
    14.         }
     
  47. Bomalidi

    Bomalidi

    Joined:
    Mar 8, 2015
    Posts:
    1
    Hi there, I've recently bought the kit and I love it. However, sometimes when I build for Android parts of the GUI stop working (such as the store and the pause menu). I can usually fix it by reimporting all assets and deleting and readding all scenes to the build, but sometimes even doing this several times doesn't fix the problem, and I have to revert back to an earlier, working build of my game. Do you have any idea how to fix this?
     
  48. bill2432

    bill2432

    Joined:
    Oct 6, 2014
    Posts:
    8
    Hi, I am using unity 5 pro the kit has some problems with this version I hope to make a new update and fix that problems. I will try the solution with the code that you write and I tell you if it works I just hope that there was an easier solution without code because I work with playmaker and I am not so familiar with c#. Thank you anyway I will try to follow the steps and I hope to fix the problem.
     
  49. John-Sandrey

    John-Sandrey

    Joined:
    Jul 2, 2012
    Posts:
    119
    Not sure if this is a bug or if you set the power ups this way. but if i was to buy 3 shields and i click on the button to activate it, the button goes away and does not reshow it self to use a second shield when i need it. it will reshow when the game restarts or if i collect another shield though.
     
  50. AW72

    AW72

    Joined:
    Mar 5, 2015
    Posts:
    5
    Hi,

    I noticed on my game that sometimes the power-ups show up as strange numbers for the total inventory that I have in the store. For example, the number of revives I had available was -2. Is there a reason that it would give me a negative number for my inventory and is there a way to prevent that from happening and stop it at 0? thanks.