function onCheckpointEntered( player, checkpoint )
{
if (checkpoint.ID == 14)
{
Boomb <- CreateObject( 380, 1, Vector(-945.472, -343.736, 8.12693), 255 );
Boomb.RotateByEuler( Vector( 3.14159, 3.14159, 1.46159), 0);
NewTimer( "deletebom", 3000,1);
}
}
function deletebom()
{
Boomb.Delete()
}
When I went to checkpoint the bomb was created but after 3 seconds it was not deleted
Quotefunction ( player, pickup )
Quoteif (checkpoint.ID == 14)
And btw, you're defining every object created as "Boomb" which means if you pick up it twice(or more) in 3 seconds it will delete the last object you created during the 3 seconds.
With that i came up this
NewTimer( "deletebom", 3000,1,Boomb.ID);
function deletebom(objid)
FindObject(objid).Delete();
Quote from: Rest on Aug 06, 2017, 03:43 AMQuotefunction ( player, pickup )
Quoteif (checkpoint.ID == 14)
And btw, you're defining every object created as "Boomb" which means if you pick up it twice(or more) in 3 seconds it will delete the last object you created during the 3 seconds.
With that i came up this
NewTimer( "deletebom", 3000,1,Boomb.ID);
function deletebom(objid)
FindObject(objid).Delete();
I was mistaken when writing this article between pickup and checkpoint. I edited the post
And thanks for it's working