I have created a group (Enemies) with 2 sprites that will be the enemies, then I have created a sprite to place them (obj_spawn) in the scene, obj_spawn has an object type variable called obj_var_enemy_name,
The idea of the function is to pass
Parameter 1: Group (Enemies) where all the enemy Sprites are.
Parameter 2: Sprite obj_spawn with the variable and the name of the enemy that I want to create.
Enemies Group in Scene
obj_spawn this is the Sprite with the Object Variable obj_var_enemy_name
The Function itself
The Function Call when my player collide with a zone, checks if zone is overlapping obj_spawn then call Createenemy function