Author Topic: Sports Events - But actually just one right now.  (Read 1936 times)

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.


Download


« Last Edit: March 25, 2017, 07:39:23 PM by Shift Kitty »


need to nobbc the example usage 2

oh whoops. didn't notice that. fixed.

THANK YOU.
You don't know HOW MUCH this will help.
If that "More Ball_---- items similar to the v21 default ones" thing won't work out i'll make do with what i have and make a small sports server
GTG!

Three download sources, good job.

At least in 2021 people won't go like BLG 4 SHUT DOWN GUR DURR and will be able to download these without going to Suggestions and requests and hoping someone still has it.