Aye j'avais peur que l'on me dise ça :p
Je n'en sais rien :/
Je met ici les infos du première objet comme celui la. C'est un tir de plasma qui se concentre avant de partir
J'utilise une time-line pour fixer la "durée de vie" et une alarme pour le faire changé de sprite et partir.
Information about object: obj_plasma_ennemy1
Sprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
/// profil de tir
time_shoot = 24;
spd_bullet = 6;
set time line bullet at position 0, Start Immediately and Don't Loop
start or resume the current time line
set Alarm 0 to time_shoot
set the sprite to spr_plasma1_concentration with subimage 1-24 and speed 1
execute code:
/// détecte l'objet créateur
inst = instance_position(x,y,obj_chasseur_2);
if inst = noone
{
instance_destroy()
}
Alarm Event for alarm 0:
set the sprite to spr_plasma1 with subimage 0 and speed 1
scale the sprite with 1 in the xdir, 1 in the ydir, rotate over 0, and mirror horizontally
set Alarm 0 to time_shoot
set speed to spd_bullet and direction to 180
Step Event:
execute code:
/// déplace l'objet avec son créateur
(inst).x = x;
(inst).y = y;
Collision Event with object obj_perso:
create a large effect of type spark relative at (0,0) of color 255 above objects
destroy the instance
create a medium effect of type spark relative at (0,0) of color 16777215 above objects
for other object: create a medium effect of type smoke relative at (0,0) of color 890619 below objects
Collision Event with object obj_bouclier:
for other object: destroy the instance
create a medium effect of type ring relative at (0,0) of color 16711808 below objects