Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
You need to have a server check if you are going to use the init fields. A simple:
if (isServer) then { //code here };
and changing your while condition to something like:
this spawn {
while {alive _this} do { //code here };
};
will make this multiplayer compatible.
You can also do something like:
sleep (random 1) to get even more variation and randomness
Also, keep in mind, you are spawning a new scheduled environment for every object that is placed. If 100 lamps are placed, you now have 100 environments that are running which is not very fun for anyone performance wise. Its best to add the objects to an array and iterate through the whole array on the server to save on performance.
I set the interval to be strictly 2 seconds apart, ON and OFF. Meaning it's ON for 2 seconds, and OFF for 2 seconds. It works fine locally hosted, but on dedicated servers, it's around ON for 20+ seconds, and OFF for maybe 0.1? I quadruple checked to see if the code is written properly, and it does seem to be working in order. We'll see how it goes tomorrow :)