211
Programming Questions / Re: Help with a boss attack
« on: July 23, 2015, 03:32:40 AM »
Yes. when you use the with statement, it affects every object and runs the code from their perspective. Another neat thing you can do is address the object running the with statement while within the code itself, like so:
with fruit{
direction=point_direction(x,y,other.x,other.y);
}
and that'll make its direction actually go towards the object that's running the with statement.
with fruit{
direction=point_direction(x,y,other.x,other.y);
}
and that'll make its direction actually go towards the object that's running the with statement.