[Bug]onPickupRespawn not working

Started by Florin Calinescu, Feb 08, 2016, 08:23 AM

Previous topic - Next topic

Florin Calinescu

Description: onPickupRespawn event messages(and maybe other things either)do not get executed.
Reproducible: Always.
What you were doing when the bug happened: I was waiting for the message to be shown.
What do you think that caused the bug: Well...I don't really know.
Evidence: Click here

.

#1
An example replicating this bug (meant for a single player!):
g_Pickup <- null;

function onPlayerSpawn(player)
{
    g_Pickup = CreatePickup(366,
                            player.World, 10,
                            player.Pos + Vector(-5.0, -5.0, 0.0),
                            255,
                            true // automatic
                            );

    //g_Pickup.Automatic = true; // already true
    g_Pickup.RespawnTime = 5000; // auto timer
}

function OnPlayerPart(player, reason)
{
    g_Pickup.Remove();
}

function onPickupClaimPicked(player, pickup)
{
    print("Pickup " + pickup.ID + " claimed.");
    return true; // Allow to pickup
}

function onPickupPickedUp(player, pickup)
{
    print("Pickup " + pickup.ID + " collected by " + player.ID + ".");
}

function onPickupRespawn(pickup)
{
    print("Pickup " + pickup.ID + " respawned.");
}

A small piece of advice... Don't close the server with Ctrl+C (while in the game) or you'll get a nice crash because that's how the Squirrel plugin likes to roll :D
.