Create a projectile.
First, download the necessary sprites from MEGA.
Create a new active object, and change its sprite.
Next, go to event List Editor (Ctrl+L). And create a new condition, in the catalog [Stage 00 – Gimmicks].
If the sonic overlaps the ice crystal.
Then, set in the object "Player_MovementValues"
The value of the Variable Hurtis 1.
Now, Sonic takes damage from contact with the crystal.
If you want the projectile to fly,change its type to Bouncing Ball,set the direction and speed.
Create an enemy.
Create 1 more active object, and set it to sprite circles.
Now, in event List Editor (Ctrl+L), check the conflict between the player and the opponent (circles).
Add another condition(Insert). Checking the presence of the sonic, in an attacking state.
That is, if the sonic attacks (rolled into a ball) and it comes into contact with the enemy (mug), only then, we call the cycle "destroyevent"
Let's call it, 1 time.
This cycle causesthe sonic to jump after destroying the enemy.
The last thing left is to destroy the mug.
Everything, the enemy is ready, though he is harmless. Let's make it so that when in contact with the enemy, the player receives damage. By analogy, create a new condition. If Atacking = 0 and the sonic touches the mug.
Then, the value of the variable Hurt,set to 1.
Now, the enemy can injure the player. It remains to add an explosion,when destroyed. To do this, at the time of destruction of the mug, create an object of explosion, inside the enemy.
As a result, it turned out the following:
That's it, now you can create your opponents and projectiles. If you have any questions,ask them in the comments,or in the VKgroup.