[Bug] OnPickupRespawn executing repeatedly

Started by Dagger, Aug 20, 2019, 12:39 PM

Previous topic - Next topic

Dagger

Description:
The event OnPickupRespawn being executing repeatedly forever when a pickup respawns.



Here's my function:
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

if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Dagger

I am setting the timer. It is somewhat like this:

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

help please.

AroliS^

#3
Quote from: Dagger on Aug 21, 2019, 07:08 PMI am setting the timer. It is somewhat like this:

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

help please.

instead it use
if ( pickup.Model == model )
{
   pickup.RespawnTime = 5000;
}

It needs to be inside of 'onPickupPickedUp' function
Lemme love ya

Dagger

Quote from: AroliS^ on Aug 21, 2019, 07:22 PMinstead it use
if ( pickup.Model == model )
{
   pickup.RespawnTime = 5000;
}

It needs to be inside of 'onPickupPickedUp' function
I did that but it doesn't solve and is not related to the original bug:
Quote from: Dagger on Aug 20, 2019, 12:39 PMDescription:
The event OnPickupRespawn being executing repeatedly forever when a pickup respawns.



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