2023-05-21: Yes, we're back. No, you can't login yet

Sports Events

Uploaded by nul

The add-on board icon. Events
The add-on file name icon. Event_Sports.zip
The add-on upload date icon. Mar 25th 2017, 9:02 PM
The add-on download count icon. 1,102

Description

Adds an event relating to the sports balls.

One input: onBallPop > Self / LastHolder / LastHClient / EventClient / MiniGame / <Named Brick>

onBallPop will be triggered on the brick that originally spawned the ball. This will not be called on balls spawned by players (whether it was a ball they spawned with, or a ball spawned via Player > SpawnProjectile.) It must be put on the brick spawning the ball, and will only be triggered when the ball is completely dead. As in, despawned either by events, scripts, and not by a player picking it up, headbutting, or resting to change state. LastHolder is the last player to hold the ball (i think, solo testing isn't all that accurate.), LastHClient is the client of that player, and EventClient should be the client that triggered the original spawning of the ball, whether they picked it up off a brick or had spawned it via an event. Minigame will be the minigame the ball belongs to.

Example usage 1: A brick that has a football on it. onItemPickup (not a default event) > Self > SetItem [None] onBallPop > Self > SetItem [Ball Football] Result: A brick that will have a single pickup ball that will respawn once the ball 'pops'.

Example usage 2: A regular brick. onActivate > Self > SpawnProjectile [etc] [Ball Football] [etc] [1.0] onActivate > Self > SetEventEnabled [0] [off] onBallPop > Self > SetEventEnabled [1] [on] Result: A brick that can be clicked and will spawn a ball, as long as any ball it spawned isn't still active.

Potential future updates: onBallRest, triggers when the ball transforms from a projectile to an item. Though I can't really see too much use for this, unless outputs are added for the Item class. Maybe some inputs too. onItemTouch anyone? onBallPickup, triggers when the ball is picked up. What separates this from onItemPickup is that this can be triggered even when the ball is picked up from a source other than the brick itself.

Comments (2)

Kokonut
2019-07-29 02:46:13
we ever gon get more?
SoarNsquid
2021-01-28 03:04:15
I'd really like to see an OnItemTouch event being added. It'd be really useful for cooking sims.