How do I trigger a channel

1 Like

It’s pretty similar to a wire.

I mean using code. Like JavaScript code

Gimkit creative doesn’t have code.

Do you mean block code? There’s something called broadcast message.

1 Like

Look through the lifecycle script. It should be somewhere there.

It dose assuming your using a moded source script

1 Like

Gimkit is built on JavaScript.

1 Like

Yes but u don’t have scars to phaser unless u use a moded script

Then don’t know.

Java script ain’t my field of knowledge. :man_shrugging:

This is the last place you want to be asking these questions. There are only 3 people here who have a chance of answering this at the moment (excluding the devs) and they’re me, you, and hexa lol

3 Likes

As for a solution, i think you’re able to send a message over colyseus for when you interact with a device, so you could trigger a channel with code by simulating an overlay button click.
(The overlay broadcasts on a channel when clicked)

Assuming that gimkit runs on ticks, I’d say that channels would be stored as booleans inside some sort of dictionary or map-like object (sorry I don’t know js) it would be a hashmap<String, Boolean> in Java though. Something similar to that. And you’d just set the Boolean to true at the beginning of the tick.

As far as I’ve seen, there isn’t a way to broadcast on a channel as the player- you have to trigger something that then broadcasts on the channel for you.

i don’t think player has the code to broadcast on channels, since it doesn’t need to. It should have device interaction code though, which as I mentioned above could be used.

I also don’t think ticks are relevant in this situation.

1 Like

Well, the whole idea of a channel broadcasting on something if the boolean for that channel is true is based on ticks.

There’s two ways to use channels: transmitting and receiving. Let’s use the zone as an example.
Screenshot 2024-02-15 3.52.48 PM
You can clearly see the words “transmit” and “receiving” this basically means that when an event occurs (let’s say leaving the zone), a signal is sent on channel “one”. If another zone has the channel “one” in it’s “Activate zone…” box, the zone will activate (if it’s not already).

wend0ver means through a mod.

Oh then I have no idea because I’ve never made a script in my life.

2 Likes

again, read this.

it will answer all your questions, and then you will mark a solution.

It does not answer the question. The forums do not have anything that can answer the question, the closest answer would be what I posted.

They mean using mods to trigger a channel.