31
Programming Questions / Re: Boshy Spike Stand How?
« on: September 14, 2016, 12:38:40 PM »
comment out the code that creates the spike and make sure standing on the block works.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
event_inherited();
instance_create(x,y,objSpikeDown);
with objBoos
{
//Calculate the boo's current distance from the center (or you can just use a constant)
var dist = point_distance(other.x, other.y, x, y);
//Calculate the boo's current angle from the center
var dir = point_direction(other.x, other.y, x, y);
//Add the number of degrees of the circle you want the boos to move each step
dir += other.RotSpeed;
//Use trig to calculate the boo's new x and y coordinates given the new angle and using the same distance
x = other.x + cos(degtorad(dir)) * dist;
y = other.y - sin(degtorad(dir)) * dist;
}
• Manipulating files is annoying due to sandboxing