Servus!
Ich brauche im GM6 sozusagen für je eine Instanz eines Objectes ein "lokales" Partikelsystem. Ich bekomme es aber einfach nicht hin dieses per Code zu erstellen!Bzw. erstellen schon auch die Emitter und Partycle Types hab ich schon alle erstellt und es gibt sie auch aber es tut sich im Game von dem Ganzen ps einfach garnichts (hab im Step event den doastep und im draw den system_draw befehl drin, aber trozdem).
auf jeden Fall hab ich die per-Code-Variante jetzt aufgegeben und frage mich ob es möglich ist ohne Code, also mit der Zusammenklick-Methode, für jede der Instanzen beim Create-Event ein eigenes kleines ps zu erstellen, welches dann beim zerstöören der Instanz zerstört wird.
Momentan hab ich es mit der Zusammenklick-Variante zwar geschafft, dass es bei EINER Instanz so ist wie ich es will, sobald aber MEHRERE Instanzen dieses Objectes gleichzeitig da sind, funktioniert es natürlich nicht mehr, weil sich die Befehle (vermute ich mal) auf ein und das selbe ps beziehen, welches dann aber bereits einer anderen Instanz "gehört".
Momentan hab ich für das Objekt Folgendes:
Information about object: obj_soul
Sprite: spr_body_to_soul
Solid: false
Visible: true
Depth: 1
Persistent: false
Parent: <no parent>
Mask: <same as sprite>
Create Event:
execute code:
image_speed=0.2;
create particle system at drawing depth 2
create particle type 0 to have shape disk, size between 2 and 4, and color going from 65280 to 16777215
set the life time for particle type 0 to lie between 10 and 20
set the speed for particle type 0 to lie between 1 and 2, the direction between 0 and 359, and the friction to 0
create emitter 0 with shape rectangle of area x - x by y - y
continuously stream 10 particles of type 0 from emitter 0
Begin Step Event:
create emitter 0 with shape rectangle of area x - x by y - y
Collision Event with object obj_mileena:
execute code:
if(sprite_index==spr_soul)
{
instance_destroy();
}
if expression sprite_index==spr_soul is true
destroy emitter 0
clear all particles in the system
destroy the particle system
Ich brauche im GM6 sozusagen für je eine Instanz eines Objectes ein "lokales" Partikelsystem. Ich bekomme es aber einfach nicht hin dieses per Code zu erstellen!Bzw. erstellen schon auch die Emitter und Partycle Types hab ich schon alle erstellt und es gibt sie auch aber es tut sich im Game von dem Ganzen ps einfach garnichts (hab im Step event den doastep und im draw den system_draw befehl drin, aber trozdem).
auf jeden Fall hab ich die per-Code-Variante jetzt aufgegeben und frage mich ob es möglich ist ohne Code, also mit der Zusammenklick-Methode, für jede der Instanzen beim Create-Event ein eigenes kleines ps zu erstellen, welches dann beim zerstöören der Instanz zerstört wird.
Momentan hab ich es mit der Zusammenklick-Variante zwar geschafft, dass es bei EINER Instanz so ist wie ich es will, sobald aber MEHRERE Instanzen dieses Objectes gleichzeitig da sind, funktioniert es natürlich nicht mehr, weil sich die Befehle (vermute ich mal) auf ein und das selbe ps beziehen, welches dann aber bereits einer anderen Instanz "gehört".
Momentan hab ich für das Objekt Folgendes:
Information about object: obj_soul
Sprite: spr_body_to_soul
Solid: false
Visible: true
Depth: 1
Persistent: false
Parent: <no parent>
Mask: <same as sprite>
Create Event:
execute code:
image_speed=0.2;
create particle system at drawing depth 2
create particle type 0 to have shape disk, size between 2 and 4, and color going from 65280 to 16777215
set the life time for particle type 0 to lie between 10 and 20
set the speed for particle type 0 to lie between 1 and 2, the direction between 0 and 359, and the friction to 0
create emitter 0 with shape rectangle of area x - x by y - y
continuously stream 10 particles of type 0 from emitter 0
Begin Step Event:
create emitter 0 with shape rectangle of area x - x by y - y
Collision Event with object obj_mileena:
execute code:
if(sprite_index==spr_soul)
{
instance_destroy();
}
if expression sprite_index==spr_soul is true
destroy emitter 0
clear all particles in the system
destroy the particle system
!! Danke, für Eure immerwieder geniale Hilfe !!!
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von DukeMS2112 ()