(30-05-2015, 11:13 PM)Alanzote Wrote: Just say to me how it Works! =)
Check my shared I have a basic alarm chip that does what your doing. Should be easy enough to figure out after seeing it
"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016
[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
(28-05-2015, 04:10 PM)Blackhawk Wrote: soundtop() does work, you probably just used it wrong. Could you show me the lines of code which create and stop the sound?
How do I use it? I used just soundtop() because the SF Doc doesn't explain anything!
03-06-2015, 12:25 AM, (This post was last modified: 03-06-2015, 12:25 AM by Destiny's Player.)
The "sound" part of Soundtop() should be a variable that you set the actual sound to. i.e.
--This here sets a variable to a sound.
Beep = sounds.create(SomeEntity,"Path/To/The/Beep")
--This here plays the sound.
Beep.play()
--This here stops the sound.
Beep.stop()
The documentation doesn't really explain it because it's placed under "Types", which lists all the functions that are used ON something, not just by themselves.
(03-06-2015, 12:25 AM)Destinys Player Wrote: The "sound" part of Soundtop() should be a variable that you set the actual sound to. i.e.
--This here sets a variable to a sound.
Beep = sounds.create(SomeEntity,"Path/To/The/Beep")
--This here plays the sound.
Beep.play()
--This here stops the sound.
Beep.stop()
The documentation doesn't really explain it because it's placed under "Types", which lists all the functions that are used ON something, not just by themselves.
Need a :, not a . to call methods, i.e
Beep:play()
Beeptop()
Otherwise you'll get a type error as methods are really just functions whose first argument is magically the object they're being called on.
16-06-2015, 04:21 PM, (This post was last modified: 16-06-2015, 04:51 PM by shinji144.)
I'm having trouble figuring out why print behaves the way it does in the following example.
Code:
--@name print test
--@author Shinji (STEAM_0:0:13398623) http://steamcommunity.com/profiles/76561197987062974/
local asdf1 = "1"
print(asdf1) --shared
if SERVER then --server
local asdf2 = "2"
print(asdf2)
else --client
local asdf3 = "3"
print(asdf3)
end
runs as - with starfall processor,
The output of 1 makes sense, server and client should both print. However, shouldn't the output of 2 be only in blue? And why does 3 not print at all?
Can anyone explain why the 2 output also prints as client, and why the 3 output does not print at all?
EDIT:
Tried using a starfall screen at Divran's suggestion, and got this-
(adding --@sharedscreen directive)
Now 3 prints but it also seems to print as server, 2 also still prints as client. Divran mentioned that this is debug print. Is there a way to turn this off so only server prints server, client prints client, and shared prints on both client and server- else a future feature request perhaps?
Also, why does 1 print twice to server and client?