Search Unity

Agar.io clone

Discussion in 'Scripting' started by S3Critsss, Jan 11, 2020.

  1. S3Critsss

    S3Critsss

    Joined:
    Jan 6, 2020
    Posts:
    111
    Im making a clone of Agar.io and i just need a script that will make my player shrink over time....
    Thank you for whoever has one..
     
    lindamelson98 likes this.
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    Well.. you have some circle defined somewhere, which is your player. It grows in size when you collect something. Now simply add that each update it decreases in size by a predefined value, multiplied with Time.deltaTime. This is really a one-liner plus some variables.

    By the way, this forum is not here for you to oursource your work to be done by other people. It's here for people to help and get helped by exchanging experiences and information. If you want people to code your game for you, then you will have to pay them.
    And this is very, very basic. If it's too much for you (nothing wrong with that), then you should probably look into the Unity workflow before tackling a network based multiplayer game like Agar.io. Unless of course you plan to make it a single-computer coop game or something as a learning experience. But then i guess you wouldnt ask for others to do your code for you.. so i doubt that's the case.
     
  3. S3Critsss

    S3Critsss

    Joined:
    Jan 6, 2020
    Posts:
    111
    ye im sorry i know its really simple cause i figured it out 5 minutes after i posted this but thank you anyway