F
foldupgames
Guest
Hey guys!
This OUGHT to be a simple, fix but it's making me crazy. I've got multiple copies of a "Terrain" object that draws terrain triangles instead of putting in a bunch of blocks. It's supposed to have a collision_line that destroys bullets when they cross the line it's drawing.
The same code works well to make the player bounce off the ground, but the bullets? Not so much.
//Terrain object step event
if instance_exists(obj_bullet)
{
if collision_line(x,y,x-640,y+640,obj_bullet,0,1)
with (other)
{
instance_destroy()
}
}
I'm missing something here. It doesn't really work and not all of the Terrain objects even do this - they just fly right through. I'm finding they also don't all generate trees like they should - it's as if the game is only considering ONE to be real. Yet, the plane hits them all just fine.
Say what?
This OUGHT to be a simple, fix but it's making me crazy. I've got multiple copies of a "Terrain" object that draws terrain triangles instead of putting in a bunch of blocks. It's supposed to have a collision_line that destroys bullets when they cross the line it's drawing.
The same code works well to make the player bounce off the ground, but the bullets? Not so much.
//Terrain object step event
if instance_exists(obj_bullet)
{
if collision_line(x,y,x-640,y+640,obj_bullet,0,1)
with (other)
{
instance_destroy()
}
}
I'm missing something here. It doesn't really work and not all of the Terrain objects even do this - they just fly right through. I'm finding they also don't all generate trees like they should - it's as if the game is only considering ONE to be real. Yet, the plane hits them all just fine.
Say what?
Last edited by a moderator: