How to make a germ-eating mechanic?

I plan to make my game two players, about getting bigger and eating each other since I can’t do multiplayer yet. I am trying to players eat each other. To this I want to check if the other player is bigger, if so you can eat the other player, but if not an the other player is bigger then they can eat you, but how do I do this?

1 Like

messages, make them send their sizes to each other on contact

4 Likes

How tried doing this but it seems to be not working.

Hello,

Something you could try to do is to assign values for each player.

Like creating two number blocks. One for player1 and another for player2. You will need to do this for both. Those number blocks will hold the sizes of each character. Each time a player’s size increases, the number of blocks also increases. Then create a number comparison using < and > to see if they can eat each other. Plug this into a switch that destroys the player.

1 Like

adding to this: you can make the values globals, so both players know the mass of the other at all times

2 Likes

Yes, that would also make this work much better and also easier.

2 Likes

Ok thank you all for the help!

1 Like

No problem! :slight_smile:

20 Character Limit