Aldollin
Chieftain
- Joined
- Mar 7, 2017
- Messages
- 87
does anyone have experience with lua scripts (gameplay context) in multiplayer?
looking at some of the weird things/bugs that are happening with my mod i feel like i am missing something essential:
it seems to me like the lua scripts i have act in every players game seperatly, resulting in 2 people seeing different results from random effects
Example: i have a lua script that randomly places resources when you build mines, giving you a chance to "discover hidden resources"
But say i am playing a game with one other player, teams enabled so we see each others territory, i build a mine, on my screen a resources spawns, but on his nothing happens (or the other way around) causing either a desync/reload or crashing the game
similar things happen with some other lua scripts as well
so:
is there something i am missing to make sure the script runs only once and affects everyones game without causing desyncs/reloads?
looking at some of the weird things/bugs that are happening with my mod i feel like i am missing something essential:
it seems to me like the lua scripts i have act in every players game seperatly, resulting in 2 people seeing different results from random effects
Example: i have a lua script that randomly places resources when you build mines, giving you a chance to "discover hidden resources"
But say i am playing a game with one other player, teams enabled so we see each others territory, i build a mine, on my screen a resources spawns, but on his nothing happens (or the other way around) causing either a desync/reload or crashing the game
similar things happen with some other lua scripts as well
so:
is there something i am missing to make sure the script runs only once and affects everyones game without causing desyncs/reloads?