How do i spawn enemies in a scene

I want to spawn enemies in the start of a game so say at level 1 there is 10 2 there is 20 etc etc.. I know how to limit the numbers as i seen this video but i cant find one to show you how to make the enemies spawn and follow you so that if they hit you they explode and your health depletes. thank you
Comments
To spawn the 'enemy' actor, you just have to put a Spawn behaviour to an actor that will generate the enemies that you can position outside the camera.
Or also you could try recycling the enemies:
Also you have to create an integer attribute to count the enemies created, and this attribute should have the number of enemies that you want to generate.
Then, every time that a enemy is generated, you have to Change Attribute:"enemies" to "enemies - 1". And keep generating enemies until 'enemies'= 0. You can have a Timer to control the spawning (check "Run till completion") putting the Rule inside.
If you make a game attribute, when you finish a level, you have to change the enemies attribute to the number of enemies that you want to have on the next level before changing the scene.
You could also make the enemies attribute a scene attribute, and have one different with the number of enemies in each level.
Then, on the enemy actor you'll have a rule that Destroys the enemy when overlaps the player actor.
Hope it helps.
thank u and sorry 4 my noobiness :LL
First you have to create three actors:
Player, Enemy and Enemy Generator.
And three attributes:
Player X, Player Y and Enemies.
Place the player on the scene. The enemy generator have to be on the scene too but outside the camera view.
You can go to the Scene tab and in the size of the scene make it a bit bigger and keep the camera size.
Then you have both placed, let's go to the Enemy generator attributes.
Under physics, you have to uncheck 'Movable' and if you want you can also check 'Fixed rotation'.
Now the Rules. Drag a 'Timer' and check "run til completion". Inside the timer create a rule.
The Rule have to say
When attribute enemies is > 0. Then drag a "Spawn actor" behaviour and select the Enemy actor and the position and direction you want it to have.
Also drag a 'change attribute' behaviour -> change 'game.enemies' to 'game.enemies - 1'
Now for the specified numer of enemies, you have to change the attribute enemies for the desided number of them in the Game Attributes tab.
The Player actor.
Drag two 'constrain attribute' behaviours, you have to use them to track the player position.
constrain: 'game.Player X' to 'self.positionX' and 'game.Player Y' to 'self.positionY'
Then you need to have a Rule to control the player, tell me how do you want to move it and I'll tell you how to do.
The enemy actor.
Drag a 'move to' behaviour. On the X axis, tell it to go to 'game.Player X' and on the Y axis to 'game.Player Y'.
You have to select the speed lower than your movements.
Create a Rule: When overlaps or colides the 'player actor'.
Drag a "destroy this actor behaviour and a Change attribute saying 'change 'game.enemies' to 'game.enemies-1'
I think that's pretty much all you have to do.
Hope it helps
Make sure you playerX&Y attributes are Real.
Let me know if it works
Am I just doing this completely wrong?
I also couldn't find where to do this:
Drag a "destroy this actor behaviour and a Change attribute saying 'change 'game.enemies' to 'game.enemies-1'
The behavior to destroy is called "Destroy". You have to put in the actor you want to be destroyed, inside a rule, with the condition: When 'ovelaps or colides' actor 'player'.