[Bug] OnPickupRespawn executing repeatedly

Dagger

  • Newbie
  • Posts: 8
[Bug] OnPickupRespawn executing repeatedly
«  »Last edited
Description:
The event OnPickupRespawn being executing repeatedly forever when a pickup respawns.



Here's my function:
Code: [Select]
function onPickupRespawn( pickup )
{
Message("Pickup ("+pickup.ID+") respawned!");
}

Reproducible:
Always

What you were doing when the bug happened:
Just testing out

What you think caused the bug:
Idk.

MatheuS

  • Wiki Contributor
  • LBR | Co-Leader & Brasil Real RPG | Developer
  • Posts: 469
Code: [Select]
if( !sucess ) tryAgain();

Dagger

  • Newbie
  • Posts: 8
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #2,  »
I am setting the timer. It is somewhat like this:

Code: [Select]
local pick = CreatePickup(368, 1, 50, Vector(-1183.42, -587.861, 11.5399), 255, true);
pick.Timer= 3000;

help please.

AroliS^

  • Jr. Member
  • Learning of Mike Tyson K.O
  • Posts: 61
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #3,  »Last edited
Quote from Dagger on August 21st, 2019, 08:08 PM
I am setting the timer. It is somewhat like this:

Code: [Select]
local pick = CreatePickup(368, 1, 50, Vector(-1183.42, -587.861, 11.5399), 255, true);
pick.Timer= 3000;

help please.
instead it use
Code: [Select]
if ( pickup.Model == model )
{
   pickup.RespawnTime = 5000;
}

It needs to be inside of
Code: [Select]
'onPickupPickedUp' function
Code: [Select]
        local plr = [ "AroliS^", "Futur3^", "Eros" ]
        foreach( i, val in plr ) print(  format( "%s players counted %i" ), val, i );
        

Dagger

  • Newbie
  • Posts: 8
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #4,  »
Quote from AroliS^ on August 21st, 2019, 08:22 PM
instead it use
Code: [Select]
if ( pickup.Model == model )
{
   pickup.RespawnTime = 5000;
}

It needs to be inside of
Code: [Select]
'onPickupPickedUp' function
I did that but it doesn't solve and is not related to the original bug:
Quote from Dagger on August 20th, 2019, 01:39 PM
Description:
The event OnPickupRespawn being executing repeatedly forever when a pickup respawns.



Here's my function:
Code: [Select]
function onPickupRespawn( pickup )
{
Message("Pickup ("+pickup.ID+") respawned!");
}