neutro
Member
Hi guys,
So now I am trying to implement an angle on my spawned snowball. I want to apply gravity and also that the movement speed of the snowball decreases. Having a bit of a hard time figuring this out. Any suggestions? The snowball movement is straight forward with fixed speed.
Code:
Snowboy and Frosties says hello
So now I am trying to implement an angle on my spawned snowball. I want to apply gravity and also that the movement speed of the snowball decreases. Having a bit of a hard time figuring this out. Any suggestions? The snowball movement is straight forward with fixed speed.
Code:
GML:
// Spawn snowball, goes right
if (image_index > 5) && (image_index < 5.34) && (image_xscale == 1) {
var inst = instance_create_layer(x, y-8, "Instances", oSnowball);
with (inst) {
speed = snowball_speed;
direction = id.image_angle;
}
}
// Spawn snowball, goes left
else if (image_index > 5) && (image_index < 5.34) && (image_xscale == -1) {
var inst = instance_create_layer(x, y-8, "Instances", oSnowball);
with (inst) {
speed = -snowball_speed;
direction = -id.image_angle;
}
}
Last edited: