wyrt_pickups
v1.0.0World
Item pickup and spawn system with proximity detection, auto-respawn, and pickup types
Features
- Static spawn point configuration
- Proximity-based pickup detection
- Configurable respawn timers
- Pickup types (health, ammo, powerups, flags)
- Pickup callbacks for game logic
- Automatic respawn loop
- Broadcast pickup events to players
Quick Start
const pickupsModule = context.getModule('wyrt_pickups');
const pickupManager = pickupsModule.createPickupManager('my_game');
// Add pickup spawn points
pickupManager.addSpawnPoint({
id: 'health_1',
type: 'health',
x: 500, y: 300,
respawnTime: 30000, // 30 seconds
data: { healAmount: 50 }
});
// Check for pickups near a player
const pickup = pickupManager.checkPickup(player.x, player.y, player.id);
if (pickup) {
player.health += pickup.data.healAmount;
}Exports
PickupManagerManages pickup spawn points and detection