Hola a todos espero tenga un buen dia, tengo esta duda como convertiria este script en un script de GM2
[gml]
var initAngle,numbBullets,bulletAngle;
initAngle=argument0;
numbBullets=argument1;
bulletAngle=360/numbBullets;
for(var i=initAngle; i<initAngle+360; i+=bulletAngle){
var thisBullet= instance_create(x, y, objBullet);
thisBullet.sprite_index=sprBull0;
thisBullet.direction=i;
thisBullet.speed=2;
}
[/gml]
[gml]function nombre_de_funcion(initAngle,numbBullets){
var bulletAngle = 360/numbBullets;
for(var i=initAngle; i<initAngle+360; i+=bulletAngle){
var thisBullet= instance_create_layer(x, y,"Instances", objBullet);
thisBullet.sprite_index=sprBull0;
thisBullet.direction=i;
thisBullet.speed=2;
}
}[/gml]
Cambia nombre_de_funcion por el nombre que le quieras poner a la función, y en instance_create_layer cambia "Instances" por la layer en la que quieras crear la instancia.