[Bug] OnPickupRespawn executing repeatedly

Dagger

  • Newbie
  • Posts: 8
[Bug] OnPickupRespawn executing repeatedly
« on August 20th, 2019, 01:39 PM »Last edited on August 20th, 2019, 01:43 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!");
}

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: 466
Code: [Select]
if( !sucess ) tryAgain();

Thanks to the VCMP community. It was the happiest period of my life.

Dagger

  • Newbie
  • Posts: 8
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #2, 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.

AroliS^

  • Jr. Member
  • PRO
  • Posts: 63
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #3, on August 21st, 2019, 08:22 PM »Last edited on August 21st, 2019, 08:24 PM
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
Lemme love ya

Dagger

  • Newbie
  • Posts: 8
[Bug] Re: OnPickupRespawn executing repeatedly
« Reply #4, on August 25th, 2019, 09:51 AM »
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!");
}