NeoShade
Member
Hi All,
Just a quick one today, because I think I may have come across a bug.
I'm running the following code in an instance destroy event:
What I'm trying to achieve is that each "side" of the instance being destroyed will break apart and rotate at a random speed, as per
What's actually happening is that all of the sides rotate at the same speed in the same direction.
All of the other
Am I missing something here?
Just a quick one today, because I think I may have come across a bug.
I'm running the following code in an instance destroy event:
GML:
for (var i = 1; i < num+1; ++i) {
// Find corners
var x1 = x+lengthdir_x(point[i], image_angle+i*(360/num));
var y1 = y+lengthdir_y(point[i], image_angle+i*(360/num));
var x2 = x+lengthdir_x(point[i-1], image_angle+(i-1)*(360/num));
var y2 = y+lengthdir_y(point[i-1], image_angle+(i-1)*(360/num));
// Find midpoints
var len = point_distance(x1, y1, x2, y2);
var dir = point_direction(x1, y1, x2, y2);
var x3 = x1 + lengthdir_x(len/2, dir);
var y3 = y1 + lengthdir_y(len/2, dir);
// Create particles
part_type_scale(PT_DEBRIS, len/2, 1);
part_type_orientation(PT_DEBRIS, dir, dir, random_range(-5, 5), 0, 0);
part_particles_create(PS, x3, y3, PT_DEBRIS, 1);
}
random_range(-5,5)
.What's actually happening is that all of the sides rotate at the same speed in the same direction.
All of the other
part_type_
functions appear to only affect particles created after the function call, but part_type_orientation
seems to affect even those particles created before the call.Am I missing something here?