Agar.io mechanics?

is it possible to recreate the mechanics of splitting and ejecting in agar.io? For people who don’t know, splitting is to make your player split into multiple halves by pressing space, and you can split again and again until its too small to split. Ejecting is to eject a small ball of mass other players can eat to gain mass, and you lose mass in the proccess. Mass is the score in agar.io, players with larger mass can eat players with smaller mass

1 Like

For splitting you can’t technically split the Gim up BUT you can use a lives system and when the player “splits” they do half the damage or whatever multiplier but have 2 lives. The splitting can’t currently be done at the same though. Idk about ejecting so I’ll have to figure that out or someone else can…

1 Like

For ejecting, I’m thinking of using gadgets, on a lifecyle “when player fires gadget” but idk how to grant other players mass when they are hit by a gadget, or how to prevent their health from decreasing (of course I can set it to 5000 but that still runs out)

you can use a health granter to always grant health with a repter untel something happens

what sus1 said or you can use when layer fires gadget FOR the health granting. maybe make gagdets have aoe for a better hit range

1 Like

the main problem is idk how to detect when a player gets hit by a gadget

something complicated (probably the best system possible currently, maybe):
have player coordinates and when gadget fired, trigger trigger. you would also need a property storing what weapon the player has, unless they all are the same.
find the range of the weapon in coordinates.
if the player getting attacked has certain coordinates or less, based on gadget range, grant mass.

I have another idea, make checkpoints all over the map and make a knockout manager and when the player gets knocked out a shard is dropped onto the knocked out player and if you pick up the shard mass is granted and when you eject you respawn basically

1 Like

and also for splitting there is a strategy in agar which you split onto a player smaller than half of your size because that increases your speed. Maybe I could just increase the player speed for a few seconds and make the points half. Because I’m too lazy to make sentries all over the map to show the other half, so I’ll just make it so after 12 or something seconds the points you lost are added again.