Particles

Posted by Kaz on May 20, 2006, 9:23 p.m.

Script-

//fireworks(x,y,size,color,alpha,depth,life,speed,gravity,grav dir,direction,number)
part_system_depth(fw_ps,argument5)
part_type_speed(fw_part,argument7,argument7,0,0)
part_type_shape(fw_part,pt_shape_disk)
part_type_direction(fw_part,argument10,argument10,0,0)
part_type_life(fw_part,argument6,argument6)
part_type_size(fw_part,argument2,argument2,0,0)
part_type_scale(fw_part,.075,.075)
part_type_color1(fw_part,argument3)
part_type_alpha1(fw_part,argument4)
part_type_gravity(fw_part,argument8,argument9)
part_emitter_region(fw_ps,fw_emit,argument0,argument0,argument1,argument1,ps_shape_rectangle,ps_distr_gaussian)
part_emitter_burst(fw_ps,fw_emit,fw_part,argument11)

Function-

fireworks(300,room_height/2,5,c_red,1,1,150,2,.2,270,random(360))

Why does it not make anything?

Comments

FredFredrickson 18 years, 6 months ago

Did you define the system it's suppose to be in?

Kaz 18 years, 6 months ago

Yes I defined eveyrthing Im supposed to. It worked before but I changed something and I dont know what heppened.

Radnom_Games 18 years, 6 months ago

Try script_execute(fireworks,300,room_height/2,5,c_red,1,1,150,2,.2,270,random(360))

flashback 18 years, 6 months ago

You didn't create anything. You need to create systems with part_system_create, particle types with part_type_create, and emitters with part_emitter_create.

so your code should look like this:

fw_ps=part_system_create()

part_system_depth(fw_ps,argument5)

fw_part=part_type_create()

part_type_speed(fw_part,argument7,argument7,0,0)

part_type_shape(fw_part,pt_shape_disk)

part_type_direction(fw_part,argument10,argument10,0,0)

part_type_life(fw_part,argument6,argument6)

part_type_size(fw_part,argument2,argument2,0,0)

part_type_scale(fw_part,.075,.075)

part_type_color1(fw_part,argument3)

part_type_alpha1(fw_part,argument4)

part_type_gravity(fw_part,argument8,argument9)

fw_emit=part_emitter_create()

part_emitter_region(fw_ps,fw_emit,argument0,argument0,argument1,argument1,ps_shape_rectangle,ps_distr_gaussian)

part_emitter_burst(fw_ps,fw_emit,fw_part,argument11)