[DiscordArchive] I don't mind changing my way of scripting things in the future.
[DiscordArchive] I don't mind changing my way of scripting things in the future.
Archived author: Honey • Posted: 2022-08-22T15:31:16.200000+00:00
Original source
I don't mind changing my way of scripting things in the future.
My main concern is that i'm unable to have existing single state scripts and future multi state scripts on one server.
IHM mentioning command handlers made me question how events are going to work at all? If i run a command and have player event 42 registered, does it fire only in the map where the player is? Or does it fire on all maps where the lua state has player event 42 registered to a function?
Archived author: Foe • Posted: 2022-08-22T16:31:43.971000+00:00
Original source
Commands would be registered per map, so it you have a command script then that command script would be available on all maps you choose to load it on
Archived author: Foe • Posted: 2022-08-22T16:32:16.825000+00:00
Original source
So for things like commands there would be no difference, except things like cross state cache
Archived author: Foe • Posted: 2022-08-22T16:47:41.631000+00:00
Original source
Most scripts would work just fine with a multi state approach, some would have to either be changed to work with a single state, and some redesigned entirely ♂️
Archived author: Honey • Posted: 2022-08-22T17:16:22.328000+00:00
Original source
what's the passed on value of `player` if the player who executed the command isn't in the map where the script is running?
nil?
> some would have to either be changed to work with a single state, and some redesigned entirely
yip, that's my biggest concern
Archived author: Foe • Posted: 2022-08-22T17:18:18.525000+00:00
Original source
That can't happen The command script runs on multiple maps, so it would only run in the state on the map the player is currently on
Archived author: Honey • Posted: 2022-08-22T17:18:57.797000+00:00
Original source
RIP, that pretty much makes it unsusable for 80% of what i do.