Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Event and Table usage help?

Asked by 5 years ago

Alright, so functions are basically blocks of code that execute whatever you have written in them, but what are events and tables actually "used" for. Lets say I wanted to make a mini-game system, where players start in a lobby and teleport to a game. Couldn't this be achieved through just functions?

0
If an event is connected to a function, it will fire and any code in that function will run when the event is fired. User#19524 175 — 5y

1 answer

Log in to vote
2
Answered by 5 years ago
Edited 5 years ago

Events are used to communicate between the server and clients (one way). Events aren't necessarily needed for a mini-games type game if you just intend to have players teleported to a lobby, play a game and then go back, but would be needed if the game is FilteringEnabled and you wanted to have players be able to do things with GUIs or currencies and such.

Tables aren't necessary either, but can help with things such as organization. For example, you could create a table of maps then randomly choose one from the table and load it. But once again all of this could be achieved through functions.

0
"but would be needed if the game is FilteringEnabled" Then they ARE needed. FilteringEnabled has been forced, Experimental Mode has been removed. User#19524 175 — 5y
0
It's been forced, but games can still be set into experimental mode manually MythicalShade 420 — 5y
0
No they cannot. User#19524 175 — 5y
0
If you're referring to the fact that you can still tick and untick the FilteringEnabled box, it is a dummy setting and does nothing. User#19524 175 — 5y
View all comments (3 more)
0
Then my bad, I hadn't known MythicalShade 420 — 5y
0
lol...well I understand a bit better now thanks. I suppose the next thing I need to learn is events xD hawkeye1940 8 — 5y
0
Good luck! MythicalShade 420 — 5y
Ad

Answer this question