Game Overlay Help please

How would I make a game overlay that makes it so when you get two blackberries, you can eat one at a time, and each time you click it you get a health boost? Is this possible?

Nevermind
For the game overlay: make it a button and when pressed transmit on channel “Eat Blackberry”. A vending machine receives the channel “Eat Blackberry” and tries to buy something for the cost of one blackberry. If it succeeds, it transmits on another channel, “eat blackberry success”. A health granter receives on the channel “eat blackberry success” to grant health
Optional: if purchase fails, transmit on a notification. Or make the overlay disappear.
Optional: show overlay on receiving blackberries. Make the overlay not visible on game start. Or like what random person said: show when a check for blackberries is visible passes.

Then just use a wire repeater with a delay of 0.5 to 1 seconds. When overlay pressed, repeat wire pulse
When wire pulse repeated, show overlay

materials:
game overlay
trigger
wire repeater X3
checker
lifecycle
relay
item granter
health granter

Game Overlay:
Type: button
overlay text: eat blackberry
Availability Scope: Player
Visible at Game Start: no

trigger:
visible in game: no
triggered by collision: no
when triggered, broadcast on channel: deac trigger
deactivate when receiving on channel: deac trigger

Item Granter:
Item: blackberry
amount to grant: -1

Checker:
type: amount of item
item: blackberry
comparison: < (greater than)
value: 0

lifecycle: Game start

relay: all players

wire repeater01: 0.1 second delay
wire repeater02: 0.1 second delay
wire repeater03: 0.5 second delay

wiring:
lifecycle, relay: event occurs —> trigger relay
relay, checker: relay triggered —> run check
checker, wire repeater01: check passes —> send wire pulse
checker, wire repeater02: check fails —> send wire pulse
wire repeater01, checker: receive wire pulse —> run check
wire repeater02, checker: receive wire pulse —> run check
wire repeater01, game overlay: receive wire pulse —> show overlay
wire repeater02, game overlay: receive wire pulse —> hide overlay
game overlay, trigger: button pressed —> trigger
trigger, game overlay: trigger triggered —> hide overlay
trigger, wire repeater03: trigger triggered —> send wire pulse
wire repeater03, trigger: receive wire pulse —> activate trigger
trigger, health granter: trigger triggered —> grant health
trigger, item granter: trigger triggered —> grant item
Screen Shot 2024-06-10 at 12.16.16 PM

in the picture, I used a damaged device because it was better for testing…
remember to use the health GRANTER.

2 Likes