Devlogs
23/8/22 - Character Abilitys
- Green: The green cubes ability is to stick to walls and stay there, other cubes can use their momentum to stick to walls but cannot stay there like the green cube can. To do this the player script checks if the game object is colliding with the environment, If so then it checks if the cube is allowed to stick and if the collision is with the side of the cube. If all these conditions are met then the cube's rigidbody is set to static.
- Black: The black cube can double jump which is simply checking weather the player has this cube enabled and allows it to jump in the air once. Later on I changed it so that the second jump was smaller and also resets any velocity.
- Yellow: Yellow cube can bounce other players in the air, to do this I moved the jumping code into a function and then called it if the collision was with a bouncy object.
- Purple: I haven implemented lava yet so I am unable to code this ability yet.
- Blue: Blues ability I had to change as I made all players be able to carry each other. The new ability that blue has is to teleport the player to them twice per level. This is done by pressing T once to enable teleporting mode and pressing T twice to teleport the selected cube to the blue cubes position. Only the blue cube can enable teleporting and once enable you switch players normally to select who you want to teleport. Once the desired player is selected then T is pressed again to teleport that player.