Box Code Above
Create a new Group for hitting the box from above
Create a new Group for hitting the box from above
Code Explanation
Code Explanation
When the Player collides with the box
When the Player collides with the box
AND the Player is ON the floor
AND the Player is ON the floor
AND there is NO wall to the left
AND there is NO wall to the left
AND there is NO wall to the right
AND there is NO wall to the right
Reset the Double Jump ability of the Player
Reset the Double Jump ability of the Player
Make the Player Jump
Make the Player Jump
Play the Hit Animation of the Box
Play the Hit Animation of the Box
Subtract one from the Durability of the Box
Subtract one from the Durability of the Box
Spawn random fruits
Spawn random fruits
Set the Fruit to be moveable
Set the Fruit to be moveable
Add a force in a random direction the fruits
Add a force in a random direction the fruits
NOTE:
NOTE:
The code checking if there is a wall to the left or the right is OPTIONAL.
The code checking if there is a wall to the left or the right is OPTIONAL.
This is a design decision.
This is a design decision.